If a given file is invalid, delete it