introduces and uses a LogWrapper and toggling of logging