Index: /tags/ipp-pv3-20140717/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- /tags/ipp-pv3-20140717/pstamp/scripts/pstamp_job_run.pl	(revision 37316)
+++ /tags/ipp-pv3-20140717/pstamp/scripts/pstamp_job_run.pl	(revision 37317)
@@ -244,9 +244,17 @@
 
         # if stage is stack deal with EXP and NUM images if selected by running ppstamp again
-        if ($stage eq 'stack' and ($options & ($PSTAMP_SELECT_EXP | $PSTAMP_SELECT_NUM))) {
+        if (!$exitStatus and $stage eq 'stack' and ($options & ($PSTAMP_SELECT_EXP | $PSTAMP_SELECT_NUM))) {
             # XXX Here I am assuming that nothing relevant gets added to $argString 
             # Need to check
             my $roiArgs = $params->{job_args};
-            my $pathBase = "$params->{stack_path_base}.unconv";
+
+            # XXX: define expnum and exptime input images in the params file so that we don't have to
+            # make assumptions about the file rules here
+            my $pathBase = $params->{stack_path_base};
+            $pathBase = $params->{path_base} unless defined $pathBase;
+            unless (defined $pathBase) {
+                my_die("stack path base undefined found when creating exp or expnum image", $job_id, $PS_EXIT_PROG_ERROR);
+            }
+            $pathBase .= ".unconv";
             my $tmpBase = "$outputBase.TMP";
             # nocompress because exp image gets corrupted if we do
