improved error message when reading external json file