generate csv file for results