use proper temp file