Ensure temporary file is removed when done