Close tempfile.