Index: trunk/MagicSoft/Mars/datacenter/scripts/filesondisk
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/filesondisk	(revision 7806)
+++ trunk/MagicSoft/Mars/datacenter/scripts/filesondisk	(revision 7807)
@@ -111,11 +111,11 @@
 do 
    runno=$missingcacorun
-   echo "no cacofile found for run "$runno >> $scriptlog 2>&1 
-   echo "finding cacofile" >> $scriptlog 2>&1 
-   ccfile=`find $subsystemdir/cc/ -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep`   
-   echo "ccfile: "$ccfile  >> $scriptlog 2>&1 
+   echo "missing cacofile for run "$runno >> $scriptlog 2>&1 
+   echo "-> finding cacofile" >> $scriptlog 2>&1 
+   ccfile=`find $subsystemdir/cc/ -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep` 2>/dev/null
+   echo " ccfile: "$ccfile  >> $scriptlog 2>&1 
    if [ "$ccfile" = "" ]
    then
-      echo "no ccfile found for run "$runno >> $scriptlog 2>&1 
+      echo " no ccfile found for run "$runno >> $scriptlog 2>&1 
       continue
    fi
@@ -125,21 +125,25 @@
       path=`dirname $ccfile`
       path=`echo $path | sed -e 's/cc/caco/'`
-      cacofile=`find $path -name *$newrun*`
+      cacofile=`find $path -name *$newrun*` 2>/dev/null
       if [ "$cacofile" = "" ]
       then
          continue
       else
-         echo "inserting cacofile $file for run $missingcacorun..." >> $scriptlog 2>&1 
+         echo " inserting cacofile $file for run $missingcacorun..." >> $scriptlog 2>&1 
          check2=`root -q -b $macrospath/insertcacofile.C+\("\"$runno\""\,"\"$newrun\""\) | tee $filesondisklogpath/insertcacofile-$missingcacorun.log | grep int | sed -e 's/(int)//'`
 
          case $check2 in
-            1)   echo "check2=$check2 -> everything ok -> insert is done" >> $scriptlog 2>&1 ;;
-            *)   echo "check2=$check2 -> ERROR -> something went wrong while inserting run "$missingcacorun >> $scriptlog 2>&1 ;;
+            1)   echo " check2=$check2 -> everything ok -> insert is done" >> $scriptlog 2>&1 ;;
+            *)   echo " check2=$check2 -> ERROR -> something went wrong while inserting run "$missingcacorun >> $scriptlog 2>&1 ;;
          esac
          break
       fi
    done
-   echo "cacofile: "$cacofile >> $scriptlog 2>&1 
-
+   if [ "$cacofile" = "" ]
+   then 
+      echo " no cacofile found for run "$runno >> $scriptlog 2>&1 
+   else
+      echo " cacofile: "$cacofile >> $scriptlog 2>&1 
+   fi
 done
 
