On WIN32 if the reopen()ed stdout is not closed it can occasionally result in missing lines in the output file