Bring back the temp files
Fix edge case in LogWriter