republic: make debug statements optional