added --debug option