Index: trunk/ippTasks/register.pro
===================================================================
--- trunk/ippTasks/register.pro	(revision 17747)
+++ trunk/ippTasks/register.pro	(revision 17777)
@@ -90,4 +90,5 @@
     # convert 'stdout' to book format
     ipptool2book stdout regPendingImfile -key exp_id:tmp_class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    book shuffle regPendingImfile
     if ($VERBOSE > 2)
       book listbook regPendingImfile
@@ -116,7 +117,11 @@
 
   task.exec
+    if ($NETWORK == 0) break
     book npages regPendingImfile -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+    if ($N == 0)
+        periods -exec $RUNEXEC
+        break
+    end
+    periods -exec 0.05 
     
     # look for new images in regPendingImfile
@@ -156,18 +161,18 @@
     ## generate output log based on filerule (convert the URI to a PATH)
     ## note that we use ipp_datapath here not ipp_filename because the CAMERA name is not yet controlled
-#echo before logfile is $logfile
     $logfile = `ipp_datapath.pl --touch $logfile`
     if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in register.pro:160"
+      echo "WARNING: logfile not defined in register.pro:165"
       break
     end
-
-#echo after logfile is $logfile
-
+    substr $WORKDIR 0 4 scheme
+    if ("$scheme" != "neb:")
+        dirname $logfile -var outpath
+        mkdir $outpath
+    end
     stdout $logfile
     stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
-
+
+    # XXX should this comment be deleted
     # add mkdir back here?
     # or make part of reigster_imfile.pl?
@@ -284,5 +289,4 @@
     # file://data/ipp004.0/gpc1/20080130
     # neb:///ipp004-vol0/gpc1/20080130
-
     ## generate output log based on filerule
     sprintf logfile "%s/%s/%s.reg.log" $WORKDIR $EXP_TAG $EXP_TAG
@@ -290,17 +294,16 @@
     ## generate output log based on filerule (convert the URI to a PATH)
     ## note that we use ipp_datapath here not ipp_filename because the CAMERA name is not yet controlled
-#echo before logfile is $logfile
     $logfile = `ipp_datapath.pl --touch $logfile`
     if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in register.pro:291"
+      echo "WARNING: logfile not defined in register.pro:298"
       break
     end
-
-#echo after logfile is $logfile
-
+    substr $WORKDIR 0 4 scheme
+    if ("$scheme" != "neb:")
+        dirname $logfile -var outpath
+        mkdir $outpath
+    end
     stdout $logfile
     stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
 
     $run = register_exp.pl --exp_id $EXP_ID --exp_tag $EXP_TAG
