Other fixes for #76: better logging and sysout