Tests for error handling of CLI