added pluggable logging with default implementation