Index: trunk/ippScripts/scripts/nightly_science.pl
===================================================================
--- trunk/ippScripts/scripts/nightly_science.pl	(revision 30293)
+++ trunk/ippScripts/scripts/nightly_science.pl	(revision 30390)
@@ -44,5 +44,5 @@
 my ( $date, $datetime, $camera, $dbname, $logfile, $verbose, $manual);
 my ( $help, $isburning, $force_stack_count, $force_diff_count, $test_mode, $this_target_only, $this_filter_only, $this_mode_only, $check_mode);
-my ( $registration_status, $burntool_status, $observing_status);
+my ( $registration_status, $burntool_status, $observing_status, $old_date);
 my ( $check_registration, $define_burntool, $queue_burntool, $check_chips, $queue_chips);
 my ( $check_stacks, $queue_stacks, $check_sweetspot, $queue_sweetspot, $check_diffs, $queue_diffs, $clean_old);
@@ -66,4 +66,5 @@
     'registraion_status'   => \$registration_status,
     'burntool_status'      => \$burntool_status,
+    'old_date=s'           => \$old_date,
     'check_stacks'         => \$check_stacks,
     'queue_stacks'         => \$queue_stacks,
@@ -1351,6 +1352,10 @@
         }
     }
+    if ($debug == 1) {
+	print "$metadata_out{nsObservingState} $metadata_out{nsDiffPotential} $metadata_out{nsDiffQueued} $is_processing $is_registering\n";
+    }
+
     if ($metadata_out{nsObservingState} eq 'END_OF_NIGHT') {
-	if ($is_processing == 0) {
+	if ($is_processing == 1) {
 	    $metadata_out{nsDiffState} = 'DIFFING';
 	}
@@ -1469,5 +1474,5 @@
 	    if (verify_uniqueness_diff($input_warp_id,$template_warp_id,$date,$target) != 0) {
 		$Nqueued++;
-		print STDERR "Diffs already queued for this $date $target $input_exp_id $template_exp_id\n";
+		print STDERR "Diffs already queued for this $date $target $input_exp_id $template_exp_id ($input_warp_id $template_warp_id) $this_object $input_comment\n";
 		next;
 	    }
