added --debug command line option