Cleaning up intermediate files