add tem file cleaning function to genSlide