Add configurable logging

Nitpick: missing new line.