added protection if json file doesn't exist