Added --debug as a command line switch