Fix wrong file scenarios