Fixed the delete of files