Logging

This will close #4