Write output to file output.json