Move log file cleanup into close_log_file_handler

Verified this 100% works on windows, I swear.