Import tempfile late