Add test scope to Mockito dependency
Only log in debug mode, add logging guard

Fixes #6