Add some logging and configurable log level