Index: trunk/DataCheck/Processing/CheckRawFilesAvail.sh
===================================================================
--- trunk/DataCheck/Processing/CheckRawFilesAvail.sh	(revision 13308)
+++ trunk/DataCheck/Processing/CheckRawFilesAvail.sh	(revision 13309)
@@ -7,4 +7,5 @@
 step=RawFileAvailISDC
 transferdelay=3 #days
+failsdir=/archive/fact/fails/raw
 
 set -C
@@ -27,5 +28,7 @@
    setstatus "start" 
 
-   rawfile=$rawdata/`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`/$night"_"`printf %03d $runid`".fits.gz"
+   night2=`echo $night | cut -c 1-4`/`echo $night | cut -c 5-6`/`echo $night | cut -c 7-8`
+   rawfile=$rawdata/$night2/$night"_"`printf %03d $runid`".fits.gz"
+   failsfile=$failsdir/$night2/$night"_"`printf %03d $runid`".fits.gz"
    test -e $rawfile 
    check1=$?
@@ -34,12 +37,22 @@
       0)   printprocesslog "INFO found rawfile "$rawfile
            ;;
-      *)   # print warning only for files which are older than $transferdelay days
-           if [ $night -lt $checknight ]
-           then 
-              printprocesslog "WARN "$rawfile" missing."
-           else
-              printprocesslog "INFO "$rawfile" missing."
-           fi
-           check="no"
+      *)   test -e $failsfile
+           check2=$?
+           
+           case $check2 in 
+              0)   printprocesslog "INFO found rawfile in "$failsfile
+                   # raw file is not in archive for files which are ok
+                   check=$check2
+                   ;;
+              *)   # print warning only for files which are older than $transferdelay days
+                   if [ $night -lt $checknight ]
+                   then 
+                      printprocesslog "WARN "$rawfile" and "$failsfile" missing."
+                   else
+                      printprocesslog "INFO "$rawfile" and "$failsfile" missing."
+                   fi
+                   check="no"
+                   ;;
+           esac
            ;;
    esac
