added --debug and --delete options