Fix tempfile