Fix wrong file check