Improve logging

Ref #215