If the logger cannot write to a file, it stores the new addition it in a LinkedList to be attempted on the next loop iteration. This can be caused by an application, such as Excel, that has the file open and has locked changes from other programs.
When SimpleInternetLog closes, it will try to write to these files one more time before exiting and losing any entries that have not been written to the files.
There are a few different ways to fix this, and they all exist in the "endProgram" method in ConnectionMaster.
- Write entries to temporary file so user can manually view them later. (Or could have SimpleInternetLogger check for them and add them to file when it starts next)
- Don't close until we can write to the files needed. Notify user that closing is hanging until it can write to files.