Fixed logging error for Windows caused by leaving the file open between writing local log and performing post log. Need confirmation that this did not break Linux logging.