Refactor - move logging into Output class.