Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 26939)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 27062)
@@ -107,5 +107,5 @@
     # Both are zero, so stack stack diff;
     unless ($use_convolved) {
-	$use_convolved = 0;
+        $use_convolved = 0;
     }
 }
@@ -120,14 +120,14 @@
         $templatePath = $file->{path_base};
         if ($file->{warp_id} == 0) {
-	    if ($use_convolved) {
-		$template = "PPSTACK.OUTPUT";
-		$templateMask = "PPSTACK.OUTPUT.MASK";
-		$templateVariance = "PPSTACK.OUTPUT.VARIANCE";
-	    }
-	    else {
-		$template     = "PPSTACK.UNCONV";
-		$templateMask = "PPSTACK.UNCONV.MASK";
-		$templateVariance = "PPSTACK.UNCONV.VARIANCE";
-	    }
+            if ($use_convolved) {
+                $template = "PPSTACK.OUTPUT";
+                $templateMask = "PPSTACK.OUTPUT.MASK";
+                $templateVariance = "PPSTACK.OUTPUT.VARIANCE";
+            }
+            else {
+                $template     = "PPSTACK.UNCONV";
+                $templateMask = "PPSTACK.UNCONV.MASK";
+                $templateVariance = "PPSTACK.UNCONV.VARIANCE";
+            }
             $templateSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
             # template is a stack so it doesn't need to be magicked
@@ -135,5 +135,5 @@
             ## use an explicit stack name for psphot output objects
         } else {
-	    $template     = "PSWARP.OUTPUT";
+            $template     = "PSWARP.OUTPUT";
             $templateMask = "PSWARP.OUTPUT.MASK";
             $templateVariance = "PSWARP.OUTPUT.VARIANCE";
@@ -146,17 +146,17 @@
         $inputMagic = $file->{magicked};    # if input is a stack the output can't be "magicked"
         if ($file->{warp_id} == 0) {
-	    if ($use_convolved) {
-		$input = "PPSTACK.OUTPUT";
-		$inputMask = "PPSTACK.OUTPUT.MASK";
-		$inputVariance = "PPSTACK.OUTPUT.VARIANCE";
-	    }
-	    else {
-		$input     = "PPSTACK.UNCONV";
-		$inputMask = "PPSTACK.UNCONV.MASK";
-		$inputVariance = "PPSTACK.UNCONV.VARIANCE";
-	    }
+            if ($use_convolved) {
+                $input = "PPSTACK.OUTPUT";
+                $inputMask = "PPSTACK.OUTPUT.MASK";
+                $inputVariance = "PPSTACK.OUTPUT.VARIANCE";
+            }
+            else {
+                $input     = "PPSTACK.UNCONV";
+                $inputMask = "PPSTACK.UNCONV.MASK";
+                $inputVariance = "PPSTACK.UNCONV.VARIANCE";
+            }
             $inputSources = "PSPHOT.OUT.CMF.MEF";  ## this must be consistent with the value in stack_skycell.pl:161
         } else {
-	    $input     = "PSWARP.OUTPUT";
+            $input     = "PSWARP.OUTPUT";
             $inputMask = "PSWARP.OUTPUT.MASK";
             $inputVariance = "PSWARP.OUTPUT.VARIANCE";
@@ -312,5 +312,5 @@
 
         my $outputStatsReal = $ipprc->file_resolve($outputStats);
-        &my_die("Couldn't find expected output file: $outputStats", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless -f $outputStatsReal;
+        &my_die("Couldn't find expected output file: $outputStats", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($outputStatsReal);
 
         # measure chip stats
@@ -341,4 +341,7 @@
                 &my_die("Couldn't find expected output file: $inverseVariance", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseVariance);
                 &my_die("Couldn't find expected output file: $inverseSources", $diff_id, $skycell_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($inverseSources);
+                if ($run_state eq 'new') {
+                    &my_die("Couldn't find expected output file: $configuration", $diff_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists($configuration);
+                }
             }
         }
