Corrected file check