install atexit handler if bLogs is used, this allows logging.shutdown()
to be called when the application exits