Removing files and finishing loop code