added command line debug flag