write results in json to file