Changed SerializeCorefData to output to file