Logging

Fixes #1