Support the scope argument

  - Also fix some error messages in the cli tester.