Adds logging. Issue #23.