Controlling melt quality of compacted graphite iron