Add logging

Closes #12.