logging fixes