Output analysis to csv file