Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 23295)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 23688)
@@ -263,7 +263,6 @@
             &my_die("Unable to perform psastro: $error_code", $cam_id, $error_code);
         }
-        # XXX do we want to give an error if astrometry fails here?
-        &my_die("Unable to find expected output file: $fpaObjects", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($fpaObjects);
-
+
+        my $quality;            # Quality flag
         if ($do_stats) {
             my $fpaStatsReal = $ipprc->file_resolve($fpaStats);
@@ -282,4 +281,10 @@
             }
             chomp $cmdflags;
+
+            ($quality) = $cmdflags =~ /-quality (\d+)/;
+        }
+
+        if (!$quality) {
+            &my_die("Unable to find expected output file: $fpaObjects", $cam_id, $PS_EXIT_PROG_ERROR) unless -f $ipprc->file_resolve($fpaObjects);
         }
 
@@ -375,5 +380,5 @@
             $command .= " -addprocessedexp";
             $command .= " -uri UNKNOWN";
-            $command .= " -code $exit_code";
+            $command .= " -fault $exit_code";
             $command .= " -path_base $outroot";
             $command .= " -path_base $outroot" if defined $outroot;
@@ -381,5 +386,5 @@
         } else {
             $command .= " -updateprocessedexp";
-            $command .= " -code $exit_code";
+            $command .= " -fault $exit_code";
         }
         $command .= " -hostname $host" if defined $host;
