Index: trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/register_imfile.pl	(revision 15777)
+++ trunk/ippScripts/scripts/register_imfile.pl	(revision 15779)
@@ -130,4 +130,7 @@
 );
 
+my $now_time = localtime();
+printf STDERR "\nstarting ppStats: %s\n", $now_time;
+
 # Run ppStats on the input file
 {
@@ -138,5 +141,5 @@
     unless ($success) { 
         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-        &my_die ("Unable to perform ppStats on exposure id $exp_id: $error_code", $exp_id, $tmp_exp_name, $tmp_class_id, $error_code);
+        &my_die ("Unable to perform ppStats on exposure id $exp_id: $error_code", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $error_code);
     }
     
@@ -145,19 +148,22 @@
     my $metadata = $mdcParser->parse(join "", @$stdout_buf); # XXX is this join necessary?
     unless ($metadata) {
-        &my_die ("Unable to parse metadata config doc", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_PROG_ERROR);
+        &my_die ("Unable to parse metadata config doc", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_PROG_ERROR);
     }
 
     # extract the stats from the metadata
     unless ($stats->parse($metadata)) {
-        &my_die ("Unable to find all values", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR);
-    }
-}
+        &my_die ("Unable to find all values", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR);
+    }
+}
+
+$now_time = localtime();
+printf STDERR "\ndone with ppStats: %s\n", $now_time;
 
 # we require at a minimum: -telescope, -inst, -filelevel, -class_id, -exp_type
-if (uc($stats->value_for_flag ("-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
-if (uc($stats->value_for_flag ("-inst"))      eq "NULL") { &my_die ("inst      not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
-if (uc($stats->value_for_flag ("-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
-if (uc($stats->value_for_flag ("-class_id"))  eq "NULL") { &my_die ("class_id  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
-if (uc($stats->value_for_flag ("-exp_type"))  eq "NULL") { &my_die ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $PS_EXIT_CONFIG_ERROR); }
+if (uc($stats->value_for_flag ("-telescope")) eq "NULL") { &my_die ("telescope not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc($stats->value_for_flag ("-inst"))      eq "NULL") { &my_die ("inst      not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc($stats->value_for_flag ("-filelevel")) eq "NULL") { &my_die ("filelevel not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc($stats->value_for_flag ("-class_id"))  eq "NULL") { &my_die ("class_id  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
+if (uc($stats->value_for_flag ("-exp_type"))  eq "NULL") { &my_die ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
 
 my $command = "$regtool -addprocessedimfile";
@@ -168,4 +174,7 @@
 $command .= " -dbname $dbname" if defined $dbname;
 $command .= $stats->cmdflags();
+
+$now_time = localtime();
+printf STDERR "\nrunning regtool update: %s\n", $now_time;
 
 # Push the results into the database
@@ -182,4 +191,7 @@
 }
 
+$now_time = localtime();
+printf STDERR "\ndone with regtool update: %s\n", $now_time;
+
 sub cache_run
 {
@@ -202,4 +214,5 @@
     my $exp_name = shift;
     my $tmp_class_id = shift;
+    my $uri = shift;
     my $exit_code = shift;
 
@@ -212,4 +225,5 @@
         $command .= " -exp_name $exp_name";
         $command .= " -tmp_class_id $tmp_class_id";
+	$command .= " -uri $uri ";
         $command .= " -telescope UNKNOWN";
         $command .= " -inst UNKNOWN";
