Ensure temp files are cleaned up