file check was wrong