checking if the json file exists to prevent an error