file check not working