clean invalid files