Added code to clean up temp files.