Logging

This PR adds some proper logging.