delete invalid files.