Index: trunk/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_job_run.pl	(revision 36018)
+++ trunk/pstamp/scripts/pstamp_job_run.pl	(revision 36048)
@@ -562,4 +562,7 @@
 }
 
+# stack_summary stage does not currently use proper file rules.
+# The parser defers handlint this to us..
+
 sub update_stack_summary_filenames {
     my $params  = shift;
@@ -570,7 +573,7 @@
     $params->{mask}   = $path_base . ".mask.b1.fits";
     $params->{weight} = $path_base . ".variance.b1.fits";
+    $params->{jpeg}   = $path_base . ".image.0.b1.jpeg";
     $params->{exp}    = $path_base . ".exp.b1.fits";
     $params->{num}    = $path_base . ".num.b1.fits";
-
 }
 
@@ -580,5 +583,6 @@
     my $result;
     my $resolved = $ipprc->file_resolve($src);
-    if ($ipprc->file_exists($resolved)) {
+    if ($resolved and $ipprc->file_exists($resolved)) {
+        print "Copying $src to $dest\n" if $verbose;;
         $result = copy($resolved, $dest);
     } else {
@@ -602,4 +606,6 @@
     my ($outputBase, $r_options, $params) = @_;
 
+    print "Just copying files for $job_id.\n";
+
     my $options = $$r_options;
     if ($options & $PSTAMP_SELECT_IMAGE) {
@@ -616,4 +622,9 @@
         }
     }
+    if ($options & $PSTAMP_SELECT_JPEG) {
+        if (!myCopy("$outputBase.jpg", $params->{jpeg}, 'jpeg', 0)) {
+            $options &= ~$PSTAMP_SELECT_JPEG;
+        }
+    }
     if ($options & $PSTAMP_SELECT_EXP) {
         if (!myCopy("$outputBase.exp.fits", $params->{exp}, 'exp', 0)) {
@@ -628,4 +639,6 @@
 
     $$r_options = $options;
+
+    print "Done with copy.\n";
 
     return 0;
