Index: trunk/pstamp/scripts/pstamp_parser_run.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 25318)
+++ trunk/pstamp/scripts/pstamp_parser_run.pl	(revision 25319)
@@ -47,4 +47,17 @@
 }
 
+my $missing_tools;
+
+my $pstamptool  = can_run('pstamptool')  or (warn "Can't find pstamptool"  and $missing_tools = 1);
+my $pstampparse = can_run('pstampparse.pl') or (warn "Can't find pstampparse.pl" and $missing_tools = 1);
+my $dqueryparse = can_run('dqueryparse.pl') or (warn "Can't find dqueryparse.pl" and $missing_tools = 1);
+my $dsget = can_run('dsget') or (warn "Can't find dsget" and $missing_tools = 1);
+
+if ($missing_tools) {
+    warn("Can't find required tools.");
+    exit ($PS_EXIT_CONFIG_ERROR);
+}
+
+
 my_die("--req_id --uri --product are required", $req_id, $PS_EXIT_CONFIG_ERROR)
     if !defined($req_id) or
@@ -88,16 +101,4 @@
 exit ($PS_EXIT_CONFIG_ERROR) unless defined $defaultDSProduct;
     
-my $missing_tools;
-
-my $pstamptool  = can_run('pstamptool')  or (warn "Can't find pstamptool"  and $missing_tools = 1);
-my $pstampparse = can_run('pstampparse.pl') or (warn "Can't find pstampparse.pl" and $missing_tools = 1);
-my $dqueryparse = can_run('dqueryparse.pl') or (warn "Can't find dqueryparse.pl" and $missing_tools = 1);
-my $dsget = can_run('dsget') or (warn "Can't find dsget" and $missing_tools = 1);
-
-if ($missing_tools) {
-    warn("Can't find required tools.");
-    exit ($PS_EXIT_CONFIG_ERROR);
-}
-
 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
 
