Fix JSON format in output file