modified generator to delete files