added check if json file exists