Implement 'debug' flag to suppress logging in terminal/console