Mostly logging improvements