prevent exception when no msg;
shutdown hook for logging