handle error if json does not exist