Index: trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/warp_skycell.pl	(revision 15737)
+++ trunk/ippScripts/scripts/warp_skycell.pl	(revision 15738)
@@ -114,4 +114,9 @@
 }
 
+my $skyFile = skycell_file($tess_id, $skycell_id, $workdir) or 
+    &my_die("Unable to get name of skycell file", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR);
+&my_die("Unable to find skycell file: $skyFile", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless
+    $ipprc->file_exists( $skyFile );
+
 $workdir = caturi( $workdir, "tess_" . $tess_id, "sky_" . $skycell_id ) if defined $workdir;
 my $outputRoot = $ipprc->file_prepare( "$tess_id.$skycell_id.wrp$warp_id", $workdir, $$imfiles[0]->{uri} );
@@ -124,9 +129,4 @@
 my $outputBin2 = $ipprc->filename("PSWARP.BIN2", $outputRoot, $skycell_id );
 my $outputStats = $outputRoot . '.stats';
-
-my $skyFile = skycell_file($tess_id, $skycell_id, $workdir) or 
-    &my_die("Unable to get name of skycell file", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR);
-&my_die("Unable to find skycell file", $warp_id, $skycell_id, $tess_id, $PS_EXIT_SYS_ERROR) unless
-    $ipprc->exists( $skyFile );
 
 my $traceDest = 'file:' . $ipprc->file_resolve($outputRoot) . ".trace"; # Trace messages
