replace undefined checkErr function

So you don't get:
```
reading .awsbox.json
fatal error: error running 'create' command: ReferenceError: checkErr is not defined
```

Seems easier just to inline the function code than to make a separate utils module to import checkErr from.