catch error for json file