Bugfixes post-merge.
Use logging instead of printing