set logger to nil to supress messages