write results to json file