logging fixes + fix #108