Index: trunk/ippScripts/scripts/addstar_run.pl
===================================================================
--- trunk/ippScripts/scripts/addstar_run.pl	(revision 33038)
+++ trunk/ippScripts/scripts/addstar_run.pl	(revision 33525)
@@ -117,4 +117,6 @@
 
 my $fpaObjects = $ipprc->filename("PSASTRO.OUTPUT", $stageroot) or &my_die("Missing entry from camera config", $add_id, $PS_EXIT_CONFIG_ERROR);
+my $fpaObjectsAlt = $fpaObjects;
+
 
 if ($stage =~ /cam/) {
@@ -162,10 +164,15 @@
 if (($stage =~/staticsky/) || ($stage =~/stack/)) {
     $fpaObjects =~ s/smf$/cmf/;
-}
-if ($stage =~/staticsky_multi/) {
+    $fpaObjectsAlt =~ s/smf$/cmf/;
+}
+my $checkalt = 0;
+if ($stage =~/staticsky/) {
     $fpaObjects =~ s/smf$/cmf/; #this should do nothing because it was already modded above
     &my_die( "can't find the filter_num for staticsky_multi, giving up.", $add_id, $PS_EXIT_SYS_ERROR) unless (defined $multi_num);
     my $nice_num = sprintf ("%03d", $multi_num);
     $fpaObjects =~ s/cmf$/$nice_num.cmf/;  #this make it look for .001.cmf, etc
+    if ($multi_num == 0) {
+	$checkalt =1 ; #if it's staticsky and multi_num = 0 there's an alternate file to try if this one doesn't work
+    }
 }
 
@@ -222,6 +229,19 @@
 	    # get the names for the camera and the real input file
 	    my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar
-	    my $realFile = $ipprc->file_resolve($fpaObjects) or &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR);
-	    
+	   
+	    my $realFile = $ipprc->file_resolve($fpaObjects);
+	    if (!defined($realFile)) {
+		print "can't find $fpaObjects\n";
+		if ($checkalt)  {
+		    $realFile = $ipprc->file_resolve($fpaObjectsAlt) or &my_die("Unable to resolve $fpaObjectsAlt", $add_id, $PS_EXIT_SYS_ERROR);
+		    $fpaObjects = $fpaObjectsAlt; # want to make sure the correct value is used.
+		} else {
+		    # try the 'good one' again and fail i
+		    #$realFile = $ipprc->file_resolve($fpaObjects) or 
+		    &my_die("Unable to resolve $fpaObjects", $add_id, $PS_EXIT_SYS_ERROR);
+		}
+		
+	    }
+
 	    # require a defined output dvo database to run addstar (ie, refuse to use the .ptolemyrc default)
 	    my $command  = "$addstar -update"; # XXX optionally set -update?
