exitDebugWriter

Flush loglines from libxmtp log writer to the file, ensuring logs are written. This should be called before the program exits, to ensure all the logs in memory have been written. this ends the writer thread.