Logging fixes/improvements