Flush log buffers on unhandled exception

Flush buffers on unhandled exception to log message in case of async logger.
Service crashes silently otherwise.