Improvements for JSON scripts

- Use OSError, IOError instead of FileNotFoundError
- Write the key "prod" as a boolean