Added logging
- fixes #41