Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 23637)
+++ 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;
Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 23637)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 23688)
@@ -181,21 +181,8 @@
     ## allow the output images to be optional, depending on the recipe / reduction class
     my $outputImageExpect = metadataLookupBool($recipeData, 'CHIP.FITS');
-    if ($outputImageExpect) {
-        &my_die("Couldn't find expected output file: $outputImage\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
-    }
-
     my $outputMaskExpect = metadataLookupBool($recipeData, 'CHIP.MASK.FITS');
-    if ($outputMaskExpect) {
-        &my_die("Couldn't find expected output file: $outputMask\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
-    }
-
     my $outputWeightExpect = metadataLookupBool($recipeData, 'CHIP.VARIANCE.FITS');
-    if ($outputWeightExpect) {
-        &my_die("Couldn't find expected output file: $outputWeight\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
-    }
-
-    &my_die("Couldn't find expected output file: $outputBin1\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
-    &my_die("Couldn't find expected output file: $outputBin2\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
-
+
+    my $quality;                # Quality flag
     if ($do_stats) {
         my $outputStatsReal = $ipprc->file_resolve($outputStats);
@@ -214,5 +201,15 @@
         }
         chomp $cmdflags;
-    }
+        ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag
+    }
+
+    if (!$quality) {
+        &my_die("Couldn't find expected output file: $outputImage\n",  $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless !$outputImageExpect or $ipprc->file_exists($outputImage);
+        &my_die("Couldn't find expected output file: $outputMask\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless !$outputMaskExpect or $ipprc->file_exists($outputMask);
+        &my_die("Couldn't find expected output file: $outputWeight\n", $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless !$outputWeightExpect or $ipprc->file_exists($outputWeight);
+        &my_die("Couldn't find expected output file: $outputBin1\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin1);
+        &my_die("Couldn't find expected output file: $outputBin2\n",   $exp_id, $chip_id, $class_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputBin2);
+    }
+
 }
 
@@ -277,5 +274,5 @@
         $command .= " -chip_id $chip_id";
         $command .= " -class_id $class_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_correct_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_correct_imfile.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_correct_imfile.pl	(revision 23688)
@@ -132,5 +132,5 @@
         $command .= " -class_id $class_id";
         $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 23688)
@@ -206,5 +206,5 @@
         $command .= " -class_id $class_id";
         $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_norm_calc.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 23688)
@@ -239,5 +239,5 @@
         $command .= " -iteration $iter";
         # XXX EAM : we should add this to the db : $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_norm_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 23688)
@@ -191,5 +191,5 @@
         $command .= " -iteration $iter";
         $command .= " -path_base $outroot ";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 23688)
@@ -205,5 +205,5 @@
         $command .= " -det_id $det_id";
         $command .= " -exp_id $exp_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -path_base $outroot";
         $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 23688)
@@ -195,5 +195,5 @@
         $command .= " -class_id $class_id";
         $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_reject_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 23688)
@@ -344,5 +344,5 @@
         $command .= " -iteration $iter";
         # XXX EAM : we should add this to the db : $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_resid_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid_exp.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_resid_exp.pl	(revision 23688)
@@ -651,5 +651,5 @@
         $command .= " -exp_id $exp_id";
         $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_resid_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid_imfile.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_resid_imfile.pl	(revision 23688)
@@ -265,5 +265,5 @@
         $command .= " -class_id $class_id";
         $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/detrend_stack.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_stack.pl	(revision 23637)
+++ trunk/ippScripts/scripts/detrend_stack.pl	(revision 23688)
@@ -262,5 +262,5 @@
         $command .= " -class_id $class_id";
         # XXX EAM : we should add this to the db : $command .= " -path_base $outroot";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 23637)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 23688)
@@ -248,10 +248,4 @@
         &my_die("Unable to perform ppSub: $error_code", $diff_id, $skycell_id, $error_code);
     }
-    &my_die("Couldn't find expected output file: $outputName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
-    &my_die("Couldn't find expected output file: $outputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
-    &my_die("Couldn't find expected output file: $outputVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputVariance);
-#    &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
-#    &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
-#    &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
 
     my $outputStatsReal = $ipprc->file_resolve($outputStats);
@@ -270,4 +264,15 @@
     }
     chomp $cmdflags;
+
+    my ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag
+
+    if (!$quality) {
+        &my_die("Couldn't find expected output file: $outputName", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
+        &my_die("Couldn't find expected output file: $outputMask", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
+        &my_die("Couldn't find expected output file: $outputVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputVariance);
+#        &my_die("Couldn't find expected output file: $outputSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
+#        &my_die("Couldn't find expected output file: $bin1Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
+#        &my_die("Couldn't find expected output file: $bin2Name",    $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
+    }
 }
 
@@ -304,5 +309,5 @@
     warn($msg);
     if (defined $diff_id and defined $skycell_id and not $no_update) {
-        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -code $exit_code";
+        my $command = "$difftool -adddiffskyfile -diff_id $diff_id -skycell_id $skycell_id -fault $exit_code";
         $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         $command .= " -hostname $host" if defined $host;
Index: trunk/ippScripts/scripts/dist_advancerun.pl
===================================================================
--- trunk/ippScripts/scripts/dist_advancerun.pl	(revision 23637)
+++ trunk/ippScripts/scripts/dist_advancerun.pl	(revision 23688)
@@ -134,5 +134,5 @@
     my $command = "$disttool -updaterun";
     $command   .= " -dist_id $dist_id";
-    $command   .= " -code $exit_code";
+    $command   .= " -fault $exit_code";
     $command   .= " -dbname $dbname" if defined $dbname;
 
Index: trunk/ippScripts/scripts/dist_component.pl
===================================================================
--- trunk/ippScripts/scripts/dist_component.pl	(revision 23637)
+++ trunk/ippScripts/scripts/dist_component.pl	(revision 23688)
@@ -304,5 +304,5 @@
     $command   .= " -dist_id $dist_id";
     $command   .= " -component $component";
-    $command   .= " -code $exit_code";
+    $command   .= " -fault $exit_code";
     $command   .= " -dbname $dbname" if defined $dbname;
 
Index: trunk/ippScripts/scripts/fake_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/fake_imfile.pl	(revision 23637)
+++ trunk/ippScripts/scripts/fake_imfile.pl	(revision 23688)
@@ -216,5 +216,5 @@
         $command .= " -path_base $outroot";
         $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/flatcorr_proc.pl
===================================================================
--- trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 23637)
+++ trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 23688)
@@ -320,5 +320,5 @@
         my $command = "$flatcorr -addprocess";
 	$command .= " -corr_id $corr_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -hostname $host" if defined $host;
         $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/magic_destreak.pl
===================================================================
--- trunk/ippScripts/scripts/magic_destreak.pl	(revision 23637)
+++ trunk/ippScripts/scripts/magic_destreak.pl	(revision 23688)
@@ -274,5 +274,5 @@
     $command   .= " -magic_ds_id $magic_ds_id";
     $command   .= " -component $component";
-    $command   .= " -code $exit_code";
+    $command   .= " -fault $exit_code";
     $command   .= " -dbname $dbname" if defined $dbname;
 
Index: trunk/ippScripts/scripts/magic_mask.pl
===================================================================
--- trunk/ippScripts/scripts/magic_mask.pl	(revision 23637)
+++ trunk/ippScripts/scripts/magic_mask.pl	(revision 23688)
@@ -152,5 +152,5 @@
         my $command = "$magictool -addmask";
         $command .= " -magic_id $magic_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system($command);
Index: trunk/ippScripts/scripts/magic_process.pl
===================================================================
--- trunk/ippScripts/scripts/magic_process.pl	(revision 23637)
+++ trunk/ippScripts/scripts/magic_process.pl	(revision 23688)
@@ -343,5 +343,5 @@
         $command .= " -magic_id $magic_id";
         $command .= " -node $node";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system($command);
Index: trunk/ippScripts/scripts/magic_tree.pl
===================================================================
--- trunk/ippScripts/scripts/magic_tree.pl	(revision 23637)
+++ trunk/ippScripts/scripts/magic_tree.pl	(revision 23688)
@@ -296,5 +296,5 @@
         my $command = "$magictool -inputtree";
         $command .= " -magic_id $magic_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system($command);
Index: trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- trunk/ippScripts/scripts/register_exp.pl	(revision 23637)
+++ trunk/ippScripts/scripts/register_exp.pl	(revision 23688)
@@ -191,5 +191,5 @@
     carp($msg);
     if (defined $exp_id and not $no_update) {
-        my $command = "$regtool -addprocessedexp -exp_id $exp_id -code $exit_code";
+        my $command = "$regtool -addprocessedexp -exp_id $exp_id -fault $exit_code";
         $command .= " -hostname $host" if defined $host;
         $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/register_imfile.pl	(revision 23637)
+++ trunk/ippScripts/scripts/register_imfile.pl	(revision 23688)
@@ -112,9 +112,9 @@
 
 # we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type
-if (uc(&value_for_flag ($cmdflags, "NULL", "-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
-if (uc(&value_for_flag ($cmdflags, "NULL", "-inst"))      eq "NULL") { &my_die ("inst      not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
-if (uc(&value_for_flag ($cmdflags, "NULL", "-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
-if (uc(&value_for_flag ($cmdflags, "NULL", "-class_id"))  eq "NULL") { &my_die ("class_id  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
-if (uc(&value_for_flag ($cmdflags, "NULL", "-exp_type"))  eq "NULL") { &my_die ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc(&value_for_flag ($cmdflags, "-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc(&value_for_flag ($cmdflags, "-inst"))      eq "NULL") { &my_die ("inst      not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc(&value_for_flag ($cmdflags, "-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc(&value_for_flag ($cmdflags, "-class_id"))  eq "NULL") { &my_die ("class_id  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc(&value_for_flag ($cmdflags, "-exp_type"))  eq "NULL") { &my_die ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
 
 my $command = "$regtool -addprocessedimfile";
@@ -226,5 +226,5 @@
         $command .= " -inst UNKNOWN";
         $command .= " -class_id $tmp_class_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -hostname $host" if defined $host;
         $command .= " -dbname $dbname" if defined $dbname;
Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 23637)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 23688)
@@ -232,11 +232,6 @@
         &my_die("Unable to perform ppStack: $error_code", $stack_id, $error_code);
     }
-    &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
-    &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
-    &my_die("Couldn't find expected output file: $outputWeight", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
-    &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
-#   &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
-#   &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
-
+
+    my $quality;                # Quality flag
     if ($do_stats) {
         my $outputStatsReal = $ipprc->file_resolve($outputStats);
@@ -255,5 +250,17 @@
         }
         chomp $cmdflags;
-    }
+
+        ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag
+    }
+
+    if (!$quality) {
+        &my_die("Couldn't find expected output file: $outputName", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputName);
+        &my_die("Couldn't find expected output file: $outputMask", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
+        &my_die("Couldn't find expected output file: $outputWeight", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputWeight);
+        &my_die("Couldn't find expected output file: $outputSources", $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputSources);
+#       &my_die("Couldn't find expected output file: $bin1Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin1Name);
+#       &my_die("Couldn't find expected output file: $bin2Name",    $stack_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($bin2Name);
+    }
+
 }
 
@@ -306,5 +313,5 @@
 
     if (defined $stack_id and not $no_update) {
-        my $command = "$stacktool -stack_id $stack_id -code $exit_code";
+        my $command = "$stacktool -stack_id $stack_id -fault $exit_code";
         if ($run_state eq 'new') {
             $command .= " -addsumskyfile";
Index: trunk/ippScripts/scripts/summit_copy.pl
===================================================================
--- trunk/ippScripts/scripts/summit_copy.pl	(revision 23637)
+++ trunk/ippScripts/scripts/summit_copy.pl	(revision 23688)
@@ -148,5 +148,5 @@
         $command .= " -class_id $class_id";
         $command .= " -uri $uri";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
 
Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 23637)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 23688)
@@ -193,5 +193,5 @@
         my $command = "$warptool -addoverlap";
         $command .= " -warp_id $warp_id";
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/warp_skycell.pl	(revision 23637)
+++ trunk/ippScripts/scripts/warp_skycell.pl	(revision 23688)
@@ -175,5 +175,4 @@
 # Run pswarp
 my $cmdflags;
-my $accept = 1;                 # Accept the skycell?
 my $do_stats;
 unless ($no_op) {
@@ -215,5 +214,5 @@
 
     if ($do_stats) {
-        # Check first for the stats file, and if the ACCEPT flag is set.
+        # Check first for the stats file
         my $outputStatsReal = $ipprc->file_resolve($outputStats);
         &my_die("Couldn't find expected output file: $outputStats", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal;
@@ -232,5 +231,7 @@
         chomp $cmdflags;
 
-        if ($cmdflags =~ /-accept/) {
+        my ($quality) = $cmdflags =~ /-quality (\d+)/; # Quality flag
+
+        if (!$quality) {
             &my_die("Couldn't find expected output file: $outputImage", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputImage);
             &my_die("Couldn't find expected output file: $outputMask", $warp_id, $skycell_id, $tess_dir, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputMask);
@@ -249,7 +250,7 @@
             $command .= " -magicked" if $magicked;
 
-            $command .= " -uri $outputImage" if $accept;
+            $command .= " -uri $outputImage" if !$quality;
             $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
-            $command .= " $cmdflags" if $accept;
+            $command .= " $cmdflags";
             $command .= " -hostname $host"   if defined $host;
             $command .= " -dbname $dbname"   if defined $dbname;
@@ -307,5 +308,5 @@
         $command .= " -skycell_id $skycell_id";
         $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
-        $command .= " -code $exit_code";
+        $command .= " -fault $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
         run(command => $command, verbose => $verbose);
