Index: trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/warp_skycell.pl	(revision 23430)
+++ 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);
