Revised MST Example to write output to file using CSV writer