Index: trunk/ippTasks/phase0.pro
===================================================================
--- trunk/ippTasks/phase0.pro	(revision 10675)
+++ trunk/ippTasks/phase0.pro	(revision 10691)
@@ -18,4 +18,8 @@
 $Phase0ExpFail = 0
 
+if ($?VERBOSE == 0)
+  echo "VERBOSE not defined: load pantasks.pro first"
+  break
+end
 if ($?LOGDIR == 0)
   echo "LOGDIR not defined: load pantasks.pro first"
@@ -24,4 +28,11 @@
 $LOGSUBDIR = $LOGDIR/phase0
 exec mkdir -p $LOGSUBDIR
+
+macro phase0.status
+  queueprint Phase0Imfiles
+  queueprint Phase0Exposures
+  echo "Phase0ImfileFail: $Phase0ImfileFail"
+  echo "Phase0ExpFail: $Phase0ExpFail"
+end
 
 # select images ready for phase0 analysis
@@ -52,5 +63,7 @@
     for i 0 $Nqueue
       queuepop stdout -var line
-      echo $line
+      if ($VERBOSE > 2)
+        echo $line
+      end
       list word -split $line
       $EXP_TAG  = $word:0
@@ -67,5 +80,7 @@
   # locked list
   task.exit    default
-    echo "phase0 pending imfiles: failure"
+    if ($VERBOSE) 
+      echo "phase0 pending imfiles: failure"
+    end
     $Phase0ImfileFail ++
   end
@@ -73,5 +88,7 @@
   # operation times out?
   task.exit    timeout
-    echo "phase0 pending imfiles: timeout"
+    if ($VERBOSE)
+      echo "phase0 pending imfiles: timeout"
+    end
   end
 end
@@ -116,10 +133,13 @@
     list word -split $word
     $base = $word:0
-    stdout $LOGSUBDIR/$base.p0.log
-    stderr $LOGSUBDIR/$base.p0.log
+    stdout $LOGSUBDIR/$base/$EXP_TAG.p0.log
+    stderr $LOGSUBDIR/$base/$EXP_TAG.p0.log
+    exec mkdir -p $LOGSUBDIR/$base
 
     # create the command line
     options "$line"
-    echo command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
+    if ($VERBOSE > 1)
+      echo command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
+    end
     command phase0_imfile.pl --exp_tag $EXP_TAG --class_id $CLASS_ID --uri $URI
   end
@@ -133,5 +153,7 @@
   # default exit status
   task.exit    default
-    echo "failure for phase0imfile.pl: $options:0"
+    if ($VERBOSE)
+      echo "failure for phase0imfile.pl: $options:0"
+    end
     queuepush Phase0Imfiles -replace -key 1 "FAIL $options:0"
     $Phase0ImfileFail ++
@@ -140,5 +162,7 @@
   # operation times out?
   task.exit    timeout
-    echo "timeout for phase0imfile.pl: $options:0"
+    if ($VERBOSE)
+      echo "timeout for phase0imfile.pl: $options:0"
+    end
     queuepush Phase0Imfiles -replace -key 1 "TIMEOUT $options:0"
   end
@@ -192,10 +216,14 @@
   # default exit status
   task.exit    default
-    echo       "phase0 pending exp: failure"
-  end
-
-  # operation times out?
-  task.exit    timeout
-    echo       "phase0 pending exp: timeout"
+    if ($VERBOSE)
+      echo       "phase0 pending exp: failure"
+    end
+  end
+
+  # operation times out?
+  task.exit    timeout
+    if ($VERBOSE)
+      echo       "phase0 pending exp: timeout"
+    end
   end
 end
@@ -230,6 +258,7 @@
     list word -split $word
     $base = $word:0
-    stdout $LOGSUBDIR/$base.p0.log
-    stderr $LOGSUBDIR/$base.p0.log
+    stdout $LOGSUBDIR/$base/$EXP_TAG.p0.log
+    stderr $LOGSUBDIR/$base/$EXP_TAG.p0.log
+    exec mkdir -p $LOGSUBDIR/$base
 
     # specify choice of remote host:(need to choose based on chips)
@@ -242,5 +271,7 @@
     # create the command line
     options "$line"
-    echo command phase0_exp.pl --exp_tag $EXP_TAG
+    if ($VERBOSE > 1)
+      echo command phase0_exp.pl --exp_tag $EXP_TAG
+    end
     command phase0_exp.pl --exp_tag $EXP_TAG
   end
