Add command line mode and debug mode