Improve logging (bugfix from previous commit)