Fixes

- Throw exception only for failed reads (not empty files)
- Cast (yet) undefined variable as array