Proper error handling

- no resource matches
- invalid resource_selector
- exit with 1 in both cases with error message