Deleting invalid files