Fix some edge cases

cc @sh1mmer @Matt-Esch
not really. the only two errors are `fs` errors and `JSON.parse` since it's the `readJSON` callback.