Index: trunk/ippScripts/scripts/addstar_run.pl
===================================================================
--- trunk/ippScripts/scripts/addstar_run.pl	(revision 27717)
+++ trunk/ippScripts/scripts/addstar_run.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/calibrate_dvo.pl
===================================================================
--- trunk/ippScripts/scripts/calibrate_dvo.pl	(revision 27717)
+++ trunk/ippScripts/scripts/calibrate_dvo.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 27717)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/detrend_correct_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_correct_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_correct_imfile.pl	(revision 27718)
@@ -8,7 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
-print "command: @ARGV\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_norm_apply.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_norm_apply.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_norm_calc.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_norm_calc.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -56,5 +57,5 @@
 
 # force det_type to be upper-case in this script
-my $det_type = uc($det_type);
+$det_type = uc($det_type);
 
 my $ipprc = PS::IPP::Config->new() or my_die( "Unable to set up", $det_id, $iter, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
Index: trunk/ippScripts/scripts/detrend_norm_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_norm_exp.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_reject_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_reject_exp.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_resid_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_resid_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_resid_imfile.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/detrend_stack.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_stack.pl	(revision 27717)
+++ trunk/ippScripts/scripts/detrend_stack.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 27717)
+++ trunk/ippScripts/scripts/diff_skycell.pl	(revision 27718)
@@ -7,6 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/dist_advancerun.pl
===================================================================
--- trunk/ippScripts/scripts/dist_advancerun.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dist_advancerun.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -174,10 +175,10 @@
         }
         &my_die("unable to find path",  $dist_id, $PS_EXIT_UNKNOWN_ERROR) if !$path;
-        my $component_dir = find_componentdir($destdir, $path); 
+        my $component_dir = find_componentdir($destdir, $path);
 #        print MANIFEST "$component METADATA\n";
         print MANIFEST "\t" , "$component", "\tSTR\t", $component_dir, "\n";
     }
     print MANIFEST "END\n\n";
-    close MANIFEST or 
+    close MANIFEST or
         &my_die("Unable to close dirinfo file $dirinfo",  $dist_id, $PS_EXIT_UNKNOWN_ERROR);
 }
Index: trunk/ippScripts/scripts/dist_bundle.pl
===================================================================
--- trunk/ippScripts/scripts/dist_bundle.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dist_bundle.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 # print "\n\n";
-# print "Starting script $0 on $host\n\n";
+# print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -115,5 +116,5 @@
 
 # Get the list of data products for this component
-# note: We my_die in get_file_list if something goes wrong. 
+# note: We my_die in get_file_list if something goes wrong.
 
 my $file_list = get_file_list($stage, $component, $path_base, $clean);
@@ -193,5 +194,5 @@
     $num_files++;
     if ($image_type && $nan_masked_pixels) {
-        # save the 
+        # save the
         if ($image_type eq 'image') {
             $image = $file_name;
@@ -222,5 +223,5 @@
     # One last check as to whether magic has been applied to the inputs
 
-    # Note: the sql for disttool -pendingcomponent won't select a component that 
+    # Note: the sql for disttool -pendingcomponent won't select a component that
     # requires magic and hasn't been magicked, but we check again here
 
@@ -327,5 +328,5 @@
 ### Pau.
 
-# return the image type (image, mask, or variance) if this file rule refers to 
+# return the image type (image, mask, or variance) if this file rule refers to
 # one of the big fits files that are not included in a clean distribution
 sub get_image_type {
@@ -360,5 +361,5 @@
 sub open_with_retries {
     my $name = shift;
-    
+
     my $tries = 1;
     my $max_tries = 5;
@@ -372,5 +373,5 @@
         }
     }
-    
+
     &my_die("failed to open $name after $max_tries tries\n", $component,
                     $PS_EXIT_DATA_ERROR) if (!$opened);
Index: trunk/ippScripts/scripts/dist_cleanup.pl
===================================================================
--- trunk/ippScripts/scripts/dist_cleanup.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dist_cleanup.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/dist_component.pl
===================================================================
--- trunk/ippScripts/scripts/dist_component.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dist_component.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/dist_defineruns.pl
===================================================================
--- trunk/ippScripts/scripts/dist_defineruns.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dist_defineruns.pl	(revision 27718)
@@ -11,6 +11,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/dist_make_fileset.pl
===================================================================
--- trunk/ippScripts/scripts/dist_make_fileset.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dist_make_fileset.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -46,5 +47,5 @@
            'dist_id=s'      => \$dist_id,    # distribution run identifier
            'dist_dir=s'     => \$dist_dir,   # directory containing dist run outputs
-           'target_id=s'    => \$target_id,  # 
+           'target_id=s'    => \$target_id,  #
            'stage=s'        => \$stage,      # raw, chip, camera, fake, warp, stack, or diff
            'stage_id=s'     => \$stage_id,   # exp_id, chip_id, etc.
@@ -209,5 +210,5 @@
     my $dsn = "DBI:mysql:host=$dbserver;database=$dbname";
 
-    my $dbh = DBI->connect($dsn, $dbuser, $dbpassword) 
+    my $dbh = DBI->connect($dsn, $dbuser, $dbpassword)
         or die "Cannot connect to database.\n";
 
@@ -227,10 +228,10 @@
 
     #
-    # we are a long ways away from the rawExp in the pipeline. Rather than do some 
+    # we are a long ways away from the rawExp in the pipeline. Rather than do some
     # very long joins in disttool, we look up the exp_name in the database using DBI
     #
     my $dbh = getDBHandle($ipprc, $dbname);
 
-    my $query; 
+    my $query;
 
     if ($stage eq 'raw') {
Index: trunk/ippScripts/scripts/dqstats_bundle.pl
===================================================================
--- trunk/ippScripts/scripts/dqstats_bundle.pl	(revision 27717)
+++ trunk/ippScripts/scripts/dqstats_bundle.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
@@ -37,30 +38,30 @@
 my ( $dqstats_id, $camera, $uri, $dbname, $verbose, $no_update, $no_op, $redirect, $save_temps);
 GetOptions(
-	   'dqstats_id=s'    => \$dqstats_id, # dqstatsrun ID
-	   'camera|c=s'      => \$camera,  # camera
-	   'dbname|d=s'      => \$dbname,  # database name
-	   'uri=s'           => \$uri, # output file destination
-	   'verbose'         => \$verbose, # print to stdout
-	   'no-update'       => \$no_update, # Update the database
-	   'no-op'           => \$no_op,   # don't do the operations
-	   'redirect-output' => \$redirect, 
-	   'save-temps'      => \$save_temps, # save temporary files
-	   ) or pod2usage( 2 );
+           'dqstats_id=s'    => \$dqstats_id, # dqstatsrun ID
+           'camera|c=s'      => \$camera,  # camera
+           'dbname|d=s'      => \$dbname,  # database name
+           'uri=s'           => \$uri, # output file destination
+           'verbose'         => \$verbose, # print to stdout
+           'no-update'       => \$no_update, # Update the database
+           'no-op'           => \$no_op,   # don't do the operations
+           'redirect-output' => \$redirect,
+           'save-temps'      => \$save_temps, # save temporary files
+           ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage( -msg => "Required options --dqstats_id --camera",
-	   -exitval => 3,
-	   ) unless
+           -exitval => 3,
+           ) unless
     defined $dqstats_id and
     defined $camera;
 
-my $ipprc = PS::IPP::Config->new( $camera ) 
+my $ipprc = PS::IPP::Config->new( $camera )
     or my_die( "Unable to set up", $dqstats_id, $PS_EXIT_CONFIG_ERROR ); # IPP config
-#my $logDest = $ipprc->filename("LOG.EXP", $uri) 
+#my $logDest = $ipprc->filename("LOG.EXP", $uri)
 #    or my_die("Missing entry from camera config", $dqstats_id, $PS_EXIT_CONFIG_ERROR);
 
 if ($redirect) {
-#    $ipprc->redirect_output($logDest) 
-#	or my_die( "Unable to redirect output", $dqstats_id, $PS_EXIT_SYS_ERROR );
+#    $ipprc->redirect_output($logDest)
+#       or my_die( "Unable to redirect output", $dqstats_id, $PS_EXIT_SYS_ERROR );
     print "\n\n";
     print "Starting script $0 on $host\n\n";
@@ -84,16 +85,16 @@
 unless ($no_op) {
     # This bit needs to make the bundle.
-    
+
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $bundle_command, verbose => $verbose);
+        run(command => $bundle_command, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to create the bundle.: $error_code", $dqstats_id, $error_code);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to create the bundle.: $error_code", $dqstats_id, $error_code);
     }
-    
+
     # Parse stdout_buf to get output file name
     ## Begin partial
     my ($tempFile, $tempName) = tempfile( "/tmp/dqstats.XXXX",
-					  UNLINK => !$save_temps, SUFFIX => 'dsin' );
+                                          UNLINK => !$save_temps, SUFFIX => 'dsin' );
     print $tempFile $uri . '|||notset' . "\n";
 
@@ -102,10 +103,10 @@
     # It can't be that simple, can it? This should probably add a fault on failure.
     ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $register_cmd, verbose => $verbose);
+        run(command => $register_cmd, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to register the bundle.: $error_code", $dqstats_id, $error_code);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to register the bundle.: $error_code", $dqstats_id, $error_code);
     }
-    
+
     # We no longer need the file generated by dqstatstool.
     unlink($uri);
@@ -118,9 +119,9 @@
     # This bit needs to set the database state to full
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $update_command, verbose => $verbose);
+        run(command => $update_command, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	warn("Unable to add result to database: $error_code\n");
-	exit($error_code);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        warn("Unable to add result to database: $error_code\n");
+        exit($error_code);
     }
 } else {
@@ -139,5 +140,5 @@
     carp($msg);
     if (defined $dqstats_id and not $no_update) {
-	# There is no fault handling, which may be a mistake. This is where a fault coding would be.
+        # There is no fault handling, which may be a mistake. This is where a fault coding would be.
 #         my $command = "$addtool -add_id $add_id";
 #         $command .= " -addprocessedexp";
Index: trunk/ippScripts/scripts/fake_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/fake_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/fake_imfile.pl	(revision 27718)
@@ -24,6 +24,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/flatcorr_init.pl
===================================================================
--- trunk/ippScripts/scripts/flatcorr_init.pl	(revision 27717)
+++ trunk/ippScripts/scripts/flatcorr_init.pl	(revision 27718)
@@ -1,5 +1,5 @@
 #!/usr/bin/env perl
 
-## USAGE:flatcorr_init.pl 
+## USAGE:flatcorr_init.pl
 ## given dbname, dvodb, filter, time range, camera, telescope, etc?
 ## select matching images and register as a new flatcorr run
@@ -24,6 +24,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -68,7 +69,7 @@
 my $caltool  = can_run('caltool')  or (warn "Can't find caltool"  and $missing_tools = 1);
 
-if ($missing_tools) { 
+if ($missing_tools) {
     warn ("Can't find required tools");
-    exit($PS_EXIT_CONFIG_ERROR); 
+    exit($PS_EXIT_CONFIG_ERROR);
 }
 
@@ -90,5 +91,5 @@
         cache_run(command => $command, verbose => 1);
 
-    unless ($success) { 
+    unless ($success) {
         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
         &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RESORT", $status, $dbname);
@@ -99,15 +100,15 @@
 {
     foreach my $filter (@filters) {
-	my $command = "$relphot $filter";
-	$command .= "-D CATDIR $catdir";
-	$command .= "-region $RAs $RAe $DECs $DECe";
-
-	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    cache_run(command => $command, verbose => 1);
-
-	unless ($success) { 
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELPHOT", $status, $dbname);
-	}
+        my $command = "$relphot $filter";
+        $command .= "-D CATDIR $catdir";
+        $command .= "-region $RAs $RAe $DECs $DECe";
+
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            cache_run(command => $command, verbose => 1);
+
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELPHOT", $status, $dbname);
+        }
     }
 }
@@ -117,15 +118,15 @@
 if (0) {
     foreach my $filter (@filters) {
-	my $command = "$uniphot $filter";
-	$command .= "-D CATDIR $catdir";
-	$command .= "-region $RAs $RAe $DECs $DECe";
-
-	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    cache_run(command => $command, verbose => 1);
-
-	unless ($success) { 
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "UNIPHOT", $status, $dbname);
-	}
+        my $command = "$uniphot $filter";
+        $command .= "-D CATDIR $catdir";
+        $command .= "-region $RAs $RAe $DECs $DECe";
+
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            cache_run(command => $command, verbose => 1);
+
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "UNIPHOT", $status, $dbname);
+        }
     }
 }
@@ -137,9 +138,9 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	cache_run(command => $command, verbose => 1);
-
-    unless ($success) { 
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELASTRO.OBJECTS", $status, $dbname);
+        cache_run(command => $command, verbose => 1);
+
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELASTRO.OBJECTS", $status, $dbname);
     }
 }
@@ -151,9 +152,9 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	cache_run(command => $command, verbose => 1);
-
-    unless ($success) { 
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELASTRO.IMAGES", $status, $dbname);
+        cache_run(command => $command, verbose => 1);
+
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die ("Unable to perform addstar -resort on region $region: $error_code", $dvo_id, $region, "RELASTRO.IMAGES", $status, $dbname);
     }
 }
@@ -185,14 +186,14 @@
     my $region    = shift;
     my $last_step = shift;
-    my $status 	  = shift;
-    my $dbname 	  = shift;
+    my $status    = shift;
+    my $dbname    = shift;
 
     carp($msg);
     if (defined $dvo_id && defined $region && defined $last_step && defined $status and not $no_update) {
         my $command = "$caltool -addcalrun";
-	$command .= " -dvo_id $dvo_id";
+        $command .= " -dvo_id $dvo_id";
         $command .= " -region $region";
-	$command .= " -last_step $last_step";
-	$command .= " -status $status";
+        $command .= " -last_step $last_step";
+        $command .= " -status $status";
         $command .= " -dbname $dbname" if defined $dbname;
         system ($command);
Index: trunk/ippScripts/scripts/flatcorr_proc.pl
===================================================================
--- trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 27717)
+++ trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 27718)
@@ -11,7 +11,7 @@
 # dvoMakeCorr -file outgrid.fits -ref ref.fits outcorr
 
-# dettool -register -det_type FLATCORR -filelevel (level) -workdir -inst, etc 
-
-# foreach $imfile () 
+# dettool -register -det_type FLATCORR -filelevel (level) -workdir -inst, etc
+
+# foreach $imfile ()
 #   dettool -register_imfile -uri, etc, etc
 
@@ -23,6 +23,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -74,11 +75,11 @@
 my $addstar     = can_run('addstar')      or (warn "Can't find addstar"      and $missing_tools = 1);
 my $dvoMakeCorr = can_run('dvoMakeCorr')  or (warn "Can't find dvoMakeCorr"  and $missing_tools = 1);
-my $detselect   = can_run('detselect') 	  or (warn "Can't find detselect"    and $missing_tools = 1);
-my $dettool     = can_run('dettool')   	  or (warn "Can't find dettool"      and $missing_tools = 1);
-my $flatcorr    = can_run('flatcorr')  	  or (warn "Can't find flatcorr"     and $missing_tools = 1);
-
-if ($missing_tools) { 
+my $detselect   = can_run('detselect')    or (warn "Can't find detselect"    and $missing_tools = 1);
+my $dettool     = can_run('dettool')      or (warn "Can't find dettool"      and $missing_tools = 1);
+my $flatcorr    = can_run('flatcorr')     or (warn "Can't find flatcorr"     and $missing_tools = 1);
+
+if ($missing_tools) {
     warn ("Can't find required tools");
-    exit($PS_EXIT_CONFIG_ERROR); 
+    exit($PS_EXIT_CONFIG_ERROR);
 }
 
@@ -95,5 +96,5 @@
 $ipprc->outroot_prepare($outcorr);
 
-if (not -e "$dvodb/flatcorr") { 
+if (not -e "$dvodb/flatcorr") {
     mkdir "$dvodb/flatcorr" or &my_die ("Unable to make output directory for relphot $dvodb/flatcorr", $corr_id, 3);
 }
@@ -104,17 +105,17 @@
 my ($DECs, $DECe) = split (",", $coords[1]);
 
-# Run addstar -resort to ensure the db is indexed 
+# Run addstar -resort to ensure the db is indexed
 # XXX addstar should be able to recognize and skip indexed tables
 {
-    my $command = "$addstar -resort"; 
+    my $command = "$addstar -resort";
     $command .= " -D CATDIR $dvodb";
     $command .= " -region $RAs $RAe $DECs $DECe";
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => $verbose);
-
-    unless ($success) { 
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die ("Unable to perform addstar -resort for dvodb $dvodb on region $region: $error_code", $corr_id, $error_code);
+        run(command => $command, verbose => $verbose);
+
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die ("Unable to perform addstar -resort for dvodb $dvodb on region $region: $error_code", $corr_id, $error_code);
     }
 }
@@ -135,9 +136,9 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => $verbose);
-
-    unless ($success) { 
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die ("Unable to perform relphot -grid for dvodb $dvodb on region $region: $error_code", $corr_id, $error_code);
+        run(command => $command, verbose => $verbose);
+
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die ("Unable to perform relphot -grid for dvodb $dvodb on region $region: $error_code", $corr_id, $error_code);
     }
 }
@@ -176,5 +177,5 @@
 
 # Push the results into the database
-{ 
+{
     my $command = "$flatcorr -addprocess";
     $command .= " -corr_id $corr_id";
@@ -184,13 +185,13 @@
     unless ($no_update) {
 
-	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $command, verbose => $verbose);
-	unless ($success) {
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    warn ("Unable to perform regtool -addprocessedimfile: $error_code");
-	    exit($error_code);
-	}
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            run(command => $command, verbose => $verbose);
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            warn ("Unable to perform regtool -addprocessedimfile: $error_code");
+            exit($error_code);
+        }
     } else {
-	print "skipping command: $command\n";
+        print "skipping command: $command\n";
     }
 }
@@ -218,5 +219,5 @@
         &my_die("Unable to parse metadata list", $corr_id, $PS_EXIT_PROG_ERROR);
 
-    # check for existence 
+    # check for existence
     my $file = $$files[0];
     my $chip_id = $file->{chip_id};
@@ -228,5 +229,5 @@
 # flatcorr -inputimfile -chip_id $chip_id
 sub get_imfiles {
-    my $chip_id = shift; 
+    my $chip_id = shift;
 
     my $command = "$flatcorr -inputimfile";
@@ -273,9 +274,9 @@
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => $verbose);
-
-    unless ($success) { 
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die ("Unable to register new detrend: $error_code", $corr_id, $PS_EXIT_PROG_ERROR);
+        run(command => $command, verbose => $verbose);
+
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die ("Unable to register new detrend: $error_code", $corr_id, $PS_EXIT_PROG_ERROR);
     }
 
@@ -298,39 +299,39 @@
 
     foreach my $file (@$files) {
-	# create the detrend correction for the imfiles based on the input imfiles
-	my $reffile = $file->{uri};
-	my $class_id = $file->{class_id};
-
-	my $uri = $ipprc->filename("DVOCORR.OUTPUT", $outcorr, $class_id);
-	unless ($uri) {
-	    &my_die ("Unable to find DVOCORR.OUTPUT in filerules", $corr_id, $PS_EXIT_PROG_ERROR);
-	}
-
-	my $command = "$dvoMakeCorr $outcorr";
-	$command .= " -file $outgrid.fits";
-	$command .= " -ref $reffile";
-
-	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $command, verbose => $verbose);
-
-	unless ($success) { 
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die ("Unable to perform dvoMakeCorr: $error_code", $corr_id, $PS_EXIT_PROG_ERROR);
-	}
-
-	# register the detrend correction imfile
-	$command = "$dettool -register_detrend_imfile";
-	$command .= " -det_id $det_id";
-	$command .= " -class_id $class_id";
-	$command .= " -uri $uri";
-	$command .= " -dbname $dbname" if defined $dbname;
-
-	( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $command, verbose => $verbose);
-
-	unless ($success) { 
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die ("Unable to register new detrend: $error_code", $corr_id, $PS_EXIT_PROG_ERROR);
-	}
+        # create the detrend correction for the imfiles based on the input imfiles
+        my $reffile = $file->{uri};
+        my $class_id = $file->{class_id};
+
+        my $uri = $ipprc->filename("DVOCORR.OUTPUT", $outcorr, $class_id);
+        unless ($uri) {
+            &my_die ("Unable to find DVOCORR.OUTPUT in filerules", $corr_id, $PS_EXIT_PROG_ERROR);
+        }
+
+        my $command = "$dvoMakeCorr $outcorr";
+        $command .= " -file $outgrid.fits";
+        $command .= " -ref $reffile";
+
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            run(command => $command, verbose => $verbose);
+
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            &my_die ("Unable to perform dvoMakeCorr: $error_code", $corr_id, $PS_EXIT_PROG_ERROR);
+        }
+
+        # register the detrend correction imfile
+        $command = "$dettool -register_detrend_imfile";
+        $command .= " -det_id $det_id";
+        $command .= " -class_id $class_id";
+        $command .= " -uri $uri";
+        $command .= " -dbname $dbname" if defined $dbname;
+
+        ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            run(command => $command, verbose => $verbose);
+
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            &my_die ("Unable to register new detrend: $error_code", $corr_id, $PS_EXIT_PROG_ERROR);
+        }
     }
 }
@@ -345,5 +346,5 @@
     if (not $no_update) {
         my $command = "$flatcorr -addprocess";
-	$command .= " -corr_id $corr_id";
+        $command .= " -corr_id $corr_id";
         $command .= " -fault $exit_code";
         $command .= " -hostname $host" if defined $host;
Index: trunk/ippScripts/scripts/ipp_detrend_combine.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_detrend_combine.pl	(revision 27717)
+++ trunk/ippScripts/scripts/ipp_detrend_combine.pl	(revision 27718)
@@ -7,6 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -32,24 +33,24 @@
     $workdir, $dbname, $no_update);
 GetOptions(
-	   'det_type=s'    => \$det_type, # Detrend type for new detrend
-	   'filelevel=s'   => \$filelevel, # File level for new detrend
-	   'inst=s'        => \$inst, # Instrument for new detrend
-	   'telescope=s'   => \$telescope, # Telescope for new detrend
-	   'filter=s'      => \$filter,	# Filter name for new detrend
-	   'det_id1=s'	   => \$det_id1, # Detrend id for detrend 1
-	   'iteration1=s'  => \$iter1, # Iteration for detrend 1
-	   'det_id2=s'	   => \$det_id2, # Detrend id for detrend 2
-	   'iteration2=s'  => \$iter2, # Iteration for detrend 2
-	   'operation=s'   => \$operation, # Operation to perform on files
-	   'mask'          => \$mask, # Operation is on a mask
-	   'workdir=s'     => \$workdir, # Working directory for output files
-	   'dbname=s'      => \$dbname,	# Database name
-	   'no-update'     => \$no_update, # Don't update the database
-	   ) or pod2usage( 2 );
+           'det_type=s'    => \$det_type, # Detrend type for new detrend
+           'filelevel=s'   => \$filelevel, # File level for new detrend
+           'inst=s'        => \$inst, # Instrument for new detrend
+           'telescope=s'   => \$telescope, # Telescope for new detrend
+           'filter=s'      => \$filter, # Filter name for new detrend
+           'det_id1=s'     => \$det_id1, # Detrend id for detrend 1
+           'iteration1=s'  => \$iter1, # Iteration for detrend 1
+           'det_id2=s'     => \$det_id2, # Detrend id for detrend 2
+           'iteration2=s'  => \$iter2, # Iteration for detrend 2
+           'operation=s'   => \$operation, # Operation to perform on files
+           'mask'          => \$mask, # Operation is on a mask
+           'workdir=s'     => \$workdir, # Working directory for output files
+           'dbname=s'      => \$dbname, # Database name
+           'no-update'     => \$no_update, # Don't update the database
+           ) or pod2usage( 2 );
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
 pod2usage( -msg => "Required options --det_type --filelevel --inst --telescope --det_id1 --iteration1 --det_id2 --iteration2 --workdir",
-	   -exitval => 3,
-	   )
+           -exitval => 3,
+           )
     unless defined $det_type
     and defined $filelevel
@@ -65,6 +66,6 @@
 $ipprc->define_camera($inst);
 
-my $STATS = 
-   [   
+my $STATS =
+   [
        #          PPSTATS KEYWORD         STATISTIC          CHIPTOOL FLAG
        { name => "ROBUST_MEDIAN",  type => "mean",  flag => "-bg",             dtype => "float" },
@@ -90,15 +91,15 @@
 die("File lists for detrends have differing lengths") unless scalar keys %$files1 == scalar keys %$files2;
 
-my ($det_id, $iter);	      # Detrend identifier for the new detrend
+my ($det_id, $iter);          # Detrend identifier for the new detrend
 unless ($no_update) {
     my $command = "$dettool -register_detrend -det_type $det_type -filelevel $filelevel -workdir $workdir " .
-	"-inst $inst -telescope $telescope"; # Command to run
+        "-inst $inst -telescope $telescope"; # Command to run
     $command .= " -filter $filter" if defined $filter;
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => 1);
+        run(command => $command, verbose => 1);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	die("Unable to run dettool -register_detrend: $error_code");
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        die("Unable to run dettool -register_detrend: $error_code");
     }
 
@@ -137,8 +138,8 @@
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => 1);
+        run(command => $command, verbose => 1);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	die("Unable to run ppArith: $error_code");
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        die("Unable to run ppArith: $error_code");
     }
 
@@ -149,28 +150,28 @@
     my $stats = PS::IPP::Metadata::Stats->new($STATS); # Stats parser
     {
-	my $statsFile;		# File handle
-	open $statsFile, $ipprc->file_resolve($outStats) or die("Can't open stats file $outStats: $!");
-	my @contents = <$statsFile>; # Contents of file
-	close $statsFile;
-	
-	my $metadata = $mdcParser->parse(join "", @contents) or die("Unable to parse metadata config doc");
-
-	unless ($stats->parse($metadata)) {
-	    &my_die("Failure extracting metadata from the statistics output file.\n");
-	}
+        my $statsFile;          # File handle
+        open $statsFile, $ipprc->file_resolve($outStats) or die("Can't open stats file $outStats: $!");
+        my @contents = <$statsFile>; # Contents of file
+        close $statsFile;
+
+        my $metadata = $mdcParser->parse(join "", @contents) or die("Unable to parse metadata config doc");
+
+        unless ($stats->parse($metadata)) {
+            &my_die("Failure extracting metadata from the statistics output file.\n");
+        }
     }
 
     # Register the imfile
     unless ($no_update) {
-	my $command = "$dettool -register_detrend_imfile -det_id $det_id "; # Command to run
-	$command .= " -class_id $class_id -uri $outName -path_base $outRoot";
-	$command .= $stats->cmdflags();
-	$command .= " -dbname $dbname" if defined $dbname;
-	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    run(command => $command, verbose => 1);
-	unless ($success) {
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    die("Unable to run dettool -register_detrend_imfile: $error_code");
-	}
+        my $command = "$dettool -register_detrend_imfile -det_id $det_id "; # Command to run
+        $command .= " -class_id $class_id -uri $outName -path_base $outRoot";
+        $command .= $stats->cmdflags();
+        $command .= " -dbname $dbname" if defined $dbname;
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            run(command => $command, verbose => 1);
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            die("Unable to run dettool -register_detrend_imfile: $error_code");
+        }
     }
 }
@@ -183,14 +184,14 @@
 sub filelist
 {
-    my $det_id = shift;		# Detrend identifier
-    my $iter = shift;		# Iteration
+    my $det_id = shift;         # Detrend identifier
+    my $iter = shift;           # Iteration
 
     my $command = "$detselect -select -det_id $det_id -iteration $iter"; # Command to run
     $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	run(command => $command, verbose => 1);
+        run(command => $command, verbose => 1);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	die("Unable to run detselect: $error_code");
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        die("Unable to run detselect: $error_code");
     }
 
@@ -202,8 +203,8 @@
 
     foreach my $item ( @$list ) {
-	my $class_id = $item->{class_id};
-	die("Multiple definitions of class_id=$class_id found for det_id=$det_id, iteration=$iter\n") if
-	    defined $files{$class_id};
-	$files{$class_id} = parse_md_list($md);
+        my $class_id = $item->{class_id};
+        die("Multiple definitions of class_id=$class_id found for det_id=$det_id, iteration=$iter\n") if
+            defined $files{$class_id};
+        $files{$class_id} = parse_md_list($md);
     }
 
Index: trunk/ippScripts/scripts/lossy_compress_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/lossy_compress_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/lossy_compress_imfile.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -86,36 +87,36 @@
 if ($state eq 'goto_compressed') {
     # Find the actual filename for this run:
-    &my_die("Couldn't find input file: $uri\n", $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR) 
-	unless ($ipprc->file_exists($uri));
+    &my_die("Couldn't find input file: $uri\n", $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR)
+        unless ($ipprc->file_exists($uri));
     my $uriReal = $ipprc->file_resolve( $uri );
 
     # Create a compressed version:
     my $compUri = $uri . ".fz";
-    &my_die("Output compressed file already exists: $compUri\n", $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR) 
-	if ($ipprc->file_exists($compUri));
+    &my_die("Output compressed file already exists: $compUri\n", $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR)
+        if ($ipprc->file_exists($compUri));
     my $compReal= $ipprc->file_resolve( $compUri, 'create');
     # Apparently we need to funpack before fpacking.  Probably should have realized that beforehand.
     my $tempfile = new File::Temp ( TEMPLATE => "${exp_name}.XXXX",
-				    DIR => '/tmp/',
-				    UNLINK => !$save_temps,
-				    SUFFIX => '.fits');
+                                    DIR => '/tmp/',
+                                    UNLINK => !$save_temps,
+                                    SUFFIX => '.fits');
     my $tempReal = $tempfile->filename;
 
     my $uncompress_command = "$funpack -S $uriReal > $tempReal";
     my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
-	run(command => $uncompress_command, verbose => $verbose);
+        run(command => $uncompress_command, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to uncompress file: $uri -> $compUri: $error_code", 
-		$exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to uncompress file: $uri -> $compUri: $error_code",
+                $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
     }
     my $compress_command = "$fpack -h -s 8 -S $tempReal >  $compReal";
     print STDERR "$compReal $uriReal $compress_command\n";
     ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
-	run(command => $compress_command, verbose => $verbose);
+        run(command => $compress_command, verbose => $verbose);
     unless ($success) {
-	$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	&my_die("Unable to compress file: $uri -> $compUri: $error_code", 
-		$exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to compress file: $uri -> $compUri: $error_code",
+                $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
     }
     my $database_command = "$regtool -updateprocessedimfile -exp_id $exp_id -class_id $class_id -set_state compressed";
@@ -123,17 +124,17 @@
 
     &my_die("Expected output compressed file not found: $compUri\n", $exp_id,$exp_name,$class_id, $uri,$PS_EXIT_SYS_ERROR)
-	unless ($ipprc->file_exists($compUri));
+        unless ($ipprc->file_exists($compUri));
 
     if ($no_update || $no_op) {
-	print STDERR "NOUPDATE: $database_command\n";
+        print STDERR "NOUPDATE: $database_command\n";
     }
     else {
-	($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
-	    run(command => $database_command, verbose => $verbose);
-	unless ($success) {
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    &my_die("Unable to update database file: $uri -> $compUri: $error_code", 
-		    $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
-	}
+        ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
+            run(command => $database_command, verbose => $verbose);
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            &my_die("Unable to update database file: $uri -> $compUri: $error_code",
+                    $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
+        }
     }
     exit(0);
@@ -149,28 +150,28 @@
     # Confirm we have both files
     &my_die("Couldn't find original file: $uri\n", $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR)
-	unless($ipprc->file_exists($uri));
+        unless($ipprc->file_exists($uri));
     my $uriReal = $ipprc->file_resolve( $uri );
-    
+
     my $compUri = $uri . ".fz";
     unless($ipprc->file_exists($compUri)) {
-	&my_die("Couldn't find compressed version of the file: $compUri\n", 
-		$exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR);
-
-	# If that die is removed, this will compress things as well.
-	# 
-# 	&my_die("Output compressed file already exists: $compUri\n", 
-# 		$exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR) 
-# 	    if ($ipprc->file_exists($compUri));
-# 	my $compReal= $ipprc->file_resolve( $compUri, 'create');
-	
-# 	my $compress_command = "$fpack -h -s 8 -S $uriReal >  $compReal";
-# 	print STDERR "$compReal $uriReal $compress_command\n";
-# 	my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
-# 	    run(command => $compress_command, verbose => $verbose);
-# 	unless ($success) {
-# 	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-# 	    &my_die("Unable to compress file: $uri -> $compUri: $error_code", 
-# 		    $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
-# 	}
+        &my_die("Couldn't find compressed version of the file: $compUri\n",
+                $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR);
+
+        # If that die is removed, this will compress things as well.
+        #
+#       &my_die("Output compressed file already exists: $compUri\n",
+#               $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR)
+#           if ($ipprc->file_exists($compUri));
+#       my $compReal= $ipprc->file_resolve( $compUri, 'create');
+
+#       my $compress_command = "$fpack -h -s 8 -S $uriReal >  $compReal";
+#       print STDERR "$compReal $uriReal $compress_command\n";
+#       my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
+#           run(command => $compress_command, verbose => $verbose);
+#       unless ($success) {
+#           $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+#           &my_die("Unable to compress file: $uri -> $compUri: $error_code",
+#                   $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
+#       }
     }
 
@@ -181,10 +182,10 @@
 
     unless ($no_op) {
-	$neb->replicate($compUri);
-	$neb->swap($uri,$compUri) or
-	    &my_die("Nebulous swap failed between $uri and $compUri", 
-		    $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR);
-    }
-    # Update database 
+        $neb->replicate($compUri);
+        $neb->swap($uri,$compUri) or
+            &my_die("Nebulous swap failed between $uri and $compUri",
+                    $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR);
+    }
+    # Update database
 
     my $database_command = "$regtool -updateprocessedimfile -exp_id $exp_id -class_id $class_id -set_state lossy ";
@@ -192,20 +193,20 @@
 
     $database_command .= " -dbname $dbname" if defined $dbname;
-    
+
     if ($no_update || $no_op) {
-	print STDERR "NOUPDATE: $database_command\n";
+        print STDERR "NOUPDATE: $database_command\n";
     }
     else {
-	my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
-	    run(command => $database_command, verbose => $verbose);
-	unless($success) {
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    $neb->swap($uri,$compUri) or
-		&my_die("DB update failed and Nebulous swap-back failed between $uri and $compUri", 
-			$exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR);
-	    &my_die("Unable to update database file: $uri -> $compUri: $error_code", 
-		    $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
-	}
-	# remove original version
+        my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf) =
+            run(command => $database_command, verbose => $verbose);
+        unless($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            $neb->swap($uri,$compUri) or
+                &my_die("DB update failed and Nebulous swap-back failed between $uri and $compUri",
+                        $exp_id,$exp_name,$class_id,$uri,$PS_EXIT_SYS_ERROR);
+            &my_die("Unable to update database file: $uri -> $compUri: $error_code",
+                    $exp_id,$exp_name,$class_id,$uri, $PS_EXIT_SYS_ERROR);
+        }
+        # remove original version
     $neb->delete($compUri);
     }
Index: trunk/ippScripts/scripts/magic_destreak.pl
===================================================================
--- trunk/ippScripts/scripts/magic_destreak.pl	(revision 27717)
+++ trunk/ippScripts/scripts/magic_destreak.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/magic_destreak_cleanup.pl
===================================================================
--- trunk/ippScripts/scripts/magic_destreak_cleanup.pl	(revision 27717)
+++ trunk/ippScripts/scripts/magic_destreak_cleanup.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/magic_destreak_defineruns.pl
===================================================================
--- trunk/ippScripts/scripts/magic_destreak_defineruns.pl	(revision 27717)
+++ trunk/ippScripts/scripts/magic_destreak_defineruns.pl	(revision 27718)
@@ -11,6 +11,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/magic_destreak_revert.pl
===================================================================
--- trunk/ippScripts/scripts/magic_destreak_revert.pl	(revision 27717)
+++ trunk/ippScripts/scripts/magic_destreak_revert.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/magic_process.pl
===================================================================
--- trunk/ippScripts/scripts/magic_process.pl	(revision 27717)
+++ trunk/ippScripts/scripts/magic_process.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/magic_tree.pl
===================================================================
--- trunk/ippScripts/scripts/magic_tree.pl	(revision 27717)
+++ trunk/ippScripts/scripts/magic_tree.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/publish_file.pl
===================================================================
--- trunk/ippScripts/scripts/publish_file.pl	(revision 27717)
+++ trunk/ippScripts/scripts/publish_file.pl	(revision 27718)
@@ -7,5 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
-print "Starting script $0 on $host\n\n";
+my $date = `date`;
+print "\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/rcserver_checkstatus.pl
===================================================================
--- trunk/ippScripts/scripts/rcserver_checkstatus.pl	(revision 27717)
+++ trunk/ippScripts/scripts/rcserver_checkstatus.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/receive_advance.pl
===================================================================
--- trunk/ippScripts/scripts/receive_advance.pl	(revision 27717)
+++ trunk/ippScripts/scripts/receive_advance.pl	(revision 27718)
@@ -7,5 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
-print "Starting script $0 on $host\n\n";
+my $date = `date`;
+print "\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/receive_file.pl
===================================================================
--- trunk/ippScripts/scripts/receive_file.pl	(revision 27717)
+++ trunk/ippScripts/scripts/receive_file.pl	(revision 27718)
@@ -7,5 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
-print "Starting script $0 on $host\n\n";
+my $date = `date`;
+print "\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
@@ -124,5 +126,5 @@
     print "dirinfo resolved is: $resolved\n" if $verbose;
 
-    open OUT, ">$resolved" 
+    open OUT, ">$resolved"
         or &my_die( "failed to open $resolved\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
     print OUT @$dirinfo_lines
@@ -130,5 +132,5 @@
     close OUT
         or &my_die( "failed to close $resolved\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
-    
+
     # update the fileset to allow processing of other files
     my $command = "$receivetool -updatefileset -fileset_id $fileset_id";
@@ -160,5 +162,5 @@
     &my_die( "failed to resolve $dbinfo_uri\n", $file_id, $PS_EXIT_UNKNOWN_ERROR) if !$resolved;
 
-    open OUT, ">$resolved" 
+    open OUT, ">$resolved"
         or &my_die( "failed to open $resolved\n", $file_id, $PS_EXIT_UNKNOWN_ERROR);
 
@@ -227,5 +229,5 @@
                 $current_component = $value;
                 $component_dir = $components->{$current_component};
-                &my_die( "$component_dir is null for $value in $filename: $runType\n", 
+                &my_die( "$component_dir is null for $value in $filename: $runType\n",
                         $file_id, $PS_EXIT_UNKNOWN_ERROR) if !$component_dir;
             } elsif ($name eq 'workdir') {
@@ -237,5 +239,5 @@
                 $new_value = basename($value);
             } elsif ((($name eq 'uri') or ($name eq 'path_base')) and ($value ne 'NULL')) {
-                &my_die( "$component_dir is null and we need it for $name", 
+                &my_die( "$component_dir is null and we need it for $name",
                         $file_id, $PS_EXIT_PROG_ERROR) if !$component_dir;
 
Index: trunk/ippScripts/scripts/receive_fileset.pl
===================================================================
--- trunk/ippScripts/scripts/receive_fileset.pl	(revision 27717)
+++ trunk/ippScripts/scripts/receive_fileset.pl	(revision 27718)
@@ -7,5 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
-print "Starting script $0 on $host\n\n";
+my $date = `date`;
+print "\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/receive_setstatus.pl
===================================================================
--- trunk/ippScripts/scripts/receive_setstatus.pl	(revision 27717)
+++ trunk/ippScripts/scripts/receive_setstatus.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -74,5 +75,5 @@
         $fileargs = " --list - --copy --abspath";
     }
-        
+
     # XXX need to create a fileset type for this
     my $command = "echo $regline | dsreg --add $status_fs_name --product $status_product --type notset";
Index: trunk/ippScripts/scripts/receive_source.pl
===================================================================
--- trunk/ippScripts/scripts/receive_source.pl	(revision 27717)
+++ trunk/ippScripts/scripts/receive_source.pl	(revision 27718)
@@ -7,5 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
-print "Starting script $0 on $host\n\n";
+my $date = `date`;
+print "\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- trunk/ippScripts/scripts/register_exp.pl	(revision 27717)
+++ trunk/ippScripts/scripts/register_exp.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/register_imfile.pl	(revision 27717)
+++ trunk/ippScripts/scripts/register_imfile.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -115,39 +116,39 @@
     my $burntoolStateGood = 0;
     foreach my $line (split /\n/, $out1) {
-	if ($line =~ /FPA.BURNTOOL.APPLIED/) {
-	    $line =~ s/^\s+//;
-	    $burntoolState = (split /\s+/, $line)[2];
-	}
-	if ($line =~ /FPA.CAMERA/) {
-	    $line =~ s/^\s+//;
-	    if ((split /\s+/, $line)[2] eq 'GPC1') {
-		$isGPC1 = 1;
-	    }
-	}
+        if ($line =~ /FPA.BURNTOOL.APPLIED/) {
+            $line =~ s/^\s+//;
+            $burntoolState = (split /\s+/, $line)[2];
+        }
+        if ($line =~ /FPA.CAMERA/) {
+            $line =~ s/^\s+//;
+            if ((split /\s+/, $line)[2] eq 'GPC1') {
+                $isGPC1 = 1;
+            }
+        }
     }
     if ($isGPC1 != 1) {
-	$burntoolState = 0; # If it's not GPC1, you shouldn't have run burntool.
+        $burntoolState = 0; # If it's not GPC1, you shouldn't have run burntool.
     }
     elsif (($isGPC1 == 1) && ($burntoolState == 1)) {
-#	print STDERR "In the good region: >>$burntoolState<<\n";
-	my $ppConfigDump_cmd = "$ppConfigDump -camera GPC1 -dump-camera -";
-	my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
-	    IPC::Cmd::run(command => $ppConfigDump_cmd, verbose => $verbose);
-	unless ($success) {
-	    $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-	    warn ("Unable to perform ppConfigDump");
-	    exit($error_code);
-	}
-
-	# This is ugly, but doing a full parse for one entry is a bit wasteful.
-	foreach my $line (split /\n/, (join "", @$stdout_buf)) {
-	    if ($line =~ /BURNTOOL.STATE.GOOD/) {
-		$line =~ s/^\s+//;
-		$burntoolStateGood = (split /\s+/, $line)[2];
-		last;
-	    }
-	}
-	$burntoolState = $burntoolStateGood; # Positive because this has the header table.
-	
+#       print STDERR "In the good region: >>$burntoolState<<\n";
+        my $ppConfigDump_cmd = "$ppConfigDump -camera GPC1 -dump-camera -";
+        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+            IPC::Cmd::run(command => $ppConfigDump_cmd, verbose => $verbose);
+        unless ($success) {
+            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+            warn ("Unable to perform ppConfigDump");
+            exit($error_code);
+        }
+
+        # This is ugly, but doing a full parse for one entry is a bit wasteful.
+        foreach my $line (split /\n/, (join "", @$stdout_buf)) {
+            if ($line =~ /BURNTOOL.STATE.GOOD/) {
+                $line =~ s/^\s+//;
+                $burntoolStateGood = (split /\s+/, $line)[2];
+                last;
+            }
+        }
+        $burntoolState = $burntoolStateGood; # Positive because this has the header table.
+
     }
     $cmdflags .= " -burntool_state $burntoolState ";
Index: trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/stack_skycell.pl	(revision 27717)
+++ trunk/ippScripts/scripts/stack_skycell.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
Index: trunk/ippScripts/scripts/tdl_generate.pl
===================================================================
--- trunk/ippScripts/scripts/tdl_generate.pl	(revision 27717)
+++ trunk/ippScripts/scripts/tdl_generate.pl	(revision 27718)
@@ -13,6 +13,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 #print "\n\n";
-#print "Starting script $0 on $host\n\n";
+#print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
@@ -58,5 +59,5 @@
 # resolve any path:// or file:// in outroot
 $outroot = $ipprc->file_resolve($outroot);
-    
+
 # Look for programs we need
 my $missing_tools;
Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 27717)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 27718)
@@ -8,6 +8,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use vars qw( $VERSION );
Index: trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/warp_skycell.pl	(revision 27717)
+++ trunk/ippScripts/scripts/warp_skycell.pl	(revision 27718)
@@ -7,6 +7,7 @@
 use Sys::Hostname;
 my $host = hostname();
+my $date = `date`;
 print "\n\n";
-print "Starting script $0 on $host\n\n";
+print "Starting script $0 on $host at $date\n\n";
 
 use DateTime;
