hides logging behind an option