fix tempfile usage