Index: trunk/pstamp/scripts/dqueryparse.pl
===================================================================
--- trunk/pstamp/scripts/dqueryparse.pl	(revision 18587)
+++ trunk/pstamp/scripts/dqueryparse.pl	(revision 18619)
@@ -86,7 +86,9 @@
 my (undef, $extname, $extver, $req_name) = split " ", $fields_output;
 
+die "$req_file is missing one of EXTNAME EXTVER or QUERY_ID" 
+    if !(defined($extname) and defined($extver) and defined($req_name));
+
 die "$req_file has EXTNAME $extname not MOPS_DETECTABILITY_QUERY table"
                 if $extname ne         "MOPS_DETECTABILITY_QUERY";
-die "$req_file does not have a QUERY_ID" if ! $req_name;
 die "$req_file is version $extver expecting 1" if $extver ne 1;
 
@@ -130,4 +132,7 @@
         $job_id = join "", @$stdout_buf;
         chomp $job_id;
+        if ($job_id && -e $response_file) {
+            rename $response_file, "$out_dir/response${job_id}.fits";
+        }
         $result = 0;
     } else {
@@ -136,4 +141,5 @@
     }
 }
+
 
 {
