add ability to print debug info in the terminal when "--debug" option is used