added --debug command line argument