added code to remove temporary files