Bugfix: Use atexit() to ensure a final \n is always printed at exit to work cleanly with new logging design