Now outputs csv files