added --debug argument