Index: trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl	(revision 42462)
+++ trunk/tools/eam/rawfix.20230221/src/advance.rawfix.pl	(revision 42464)
@@ -56,5 +56,5 @@
 
     # select and advance nights already running
-    my $sql_get_run = "SELECT dateobs from nights where state like '%.done'";
+    my $sql_get_run = "SELECT dateobs from nights where state like '%.done' and state != 'md5fix.done'";
     my $runref   = $raw_dbh->selectall_arrayref( $sql_get_run );
     my @runarray = @$runref;
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt	(revision 42462)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.burntool.pt	(revision 42464)
@@ -146,8 +146,4 @@
     book getword burnhost.book $pageName fixhost -var BURNHOST
     book getword burnhost.book $pageName chipID  -var CHIP_ID
-    option $pageName $DATEOBS
-
-    stdout $DATEOBS/log.burntool.run.$CHIP_ID.v$ITER
-    stderr $DATEOBS/log.burntool.run.$CHIP_ID.v$ITER
 
     substr $DATEOBS 0 4 YEAR
@@ -156,4 +152,11 @@
     sprintf STARTDATE "%s/%s/%s" $YEAR $MONTH $DAY
     sprintf ENDDATE "%s/%s/%s,23:59:59" $YEAR $MONTH $DAY
+
+    option $pageName $DATEOBS $YEAR
+    # save DATEOBS so we can find the md5sum.book entry
+    # also save YEAR for output log
+
+    stdout $mypath/$YEAR/$DATEOBS/log.burntool.run.$CHIP_ID.v$ITER
+    stderr $mypath/$YEAR/$DATEOBS/log.burntool.run.$CHIP_ID.v$ITER
 
     host -required $BURNHOST
@@ -274,7 +277,8 @@
   $Ndone ++
   book setword burntool.book $options:1 NDONE $Ndone
+
+  sprintf tmpline "%s/%s/%s/log.burntool.runhosts.v%d" $mypath $options:2 $options:1 $ITER
   if ("$1" != "OK")
     book setword burntool.book $options:1 pantasksQuality $1
-    sprintf tmpline "%s/%s/log.burntool.runhosts.v%d" $mypath $options:1 $ITER
     exec echo "failure $1 $options:0" >> $tmpline
   else
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt	(revision 42462)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.fixchip.pt	(revision 42464)
@@ -86,6 +86,8 @@
     # save the page so we can use it below
 
+    substr $DATEOBS 0 4 YEAR
+
     # write an entry point in the log for this night
-    sprintf tmpline "%s/%s/log.fixchip.runhosts.v%d" $mypath $DATEOBS $ITER
+    sprintf tmpline "%s/%s/%s/log.fixchip.runhosts.v%d" $mypath $YEAR $DATEOBS $ITER
     date -var mydate
     exec echo "# start runhosts $mydate" >> $tmpline
@@ -149,5 +151,4 @@
     book getword fixhost.book $pageName fixhost -var FIXHOST
     book getword fixhost.book $pageName chipID  -var CHIP_ID
-    option $pageName $DATEOBS
 
     substr $DATEOBS 0 4 YEAR
@@ -155,4 +156,8 @@
     substr $DATEOBS 6 2 DAY
     sprintf FULLDATE "%s/%s/%s" $YEAR $MONTH $DAY
+
+    option $pageName $DATEOBS $YEAR
+    # save DATEOBS so we can find the md5sum.book entry
+    # also save YEAR for output log
 
     stdout $mypath/$YEAR/$DATEOBS/log.fixchip.run.$CHIP_ID.v$ITER
@@ -268,4 +273,6 @@
   end
 
+  # options are : pagename DATEOBS YEAR
+
   book setword fixhost.book $options:0 pantaskState DONE
   book getword fixchip.book $options:1 NHOST -var Nhosts
@@ -274,7 +281,8 @@
   $Ndone ++
   book setword fixchip.book $options:1 NDONE $Ndone
+
+  sprintf tmpline "%s/%s/%s/log.fixchip.runhosts.v%d" $mypath $options:2 $options:1 $ITER
   if ("$1" != "OK")
     book setword fixchip.book $options:1 pantasksQuality $1
-    sprintf tmpline "%s/%s/log.fixchip.runhosts.v%d" $mypath $options:1 $ITER
     exec echo "failure $1 $options:0" >> $tmpline
   else
Index: trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt
===================================================================
--- trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt	(revision 42462)
+++ trunk/tools/eam/rawfix.20230221/src/rawfix.md5sum.pt	(revision 42464)
@@ -86,6 +86,8 @@
     # save the page so we can use it below
 
+    substr $DATEOBS 0 4 YEAR
+
     # write an entry point in the log for this night
-    sprintf tmpline "%s/%s/log.md5sum.runhosts.v%d" $mypath $DATEOBS $ITER
+    sprintf tmpline "%s/%s/%s/log.md5sum.runhosts.v%d" $mypath $YEAR $DATEOBS $ITER
     date -var mydate
     exec echo "# start runhosts $mydate" >> $tmpline
@@ -153,12 +155,13 @@
     book getword md5host.book $pageName md5host -var MD5HOST
 
-    option $pageName $DATEOBS
+    substr $DATEOBS 0 4 YEAR
+
+    option $pageName $DATEOBS $YEAR
     # save DATEOBS so we can find the md5sum.book entry
-
-    substr $DATEOBS 0 4 YEAR
+    # also save YEAR for output log
 
     # does the output go here?
-    stdout $mypath/$YEAR/$DATEOBS/log.md5sum.runhosts.v$ITER  
-    stderr $mypath/$YEAR/$DATEOBS/log.md5sum.runhosts.v$ITER  
+    stdout $mypath/$YEAR/$DATEOBS/log.md5sum.$MD5HOST.v$ITER  
+    stderr $mypath/$YEAR/$DATEOBS/log.md5sum.$MD5HOST.v$ITER  
 
     $USE_HOST = $MD5HOST
@@ -276,4 +279,6 @@
   end
 
+  # options are : pagename DATEOBS YEAR
+
   book setword md5host.book $options:0 pantaskState DONE
   book getword md5sum.book $options:1 NHOST -var Nhosts
@@ -282,7 +287,8 @@
   $Ndone ++
   book setword md5sum.book $options:1 NDONE $Ndone
+
+  sprintf tmpline "%s/%s/%s/log.md5sum.runhosts.v%d" $mypath $options:2 $options:1 $ITER
   if ("$1" != "OK")
     book setword md5sum.book $options:1 pantasksQuality $1
-    sprintf tmpline "%s/%s/log.md5sum.runhosts.v%d" $mypath $options:1 $ITER
     exec echo "failure $1 $options:0" >> $tmpline
   else
