Added error handling for broken json files.