Better handle temp files