Added option to export results to csv files.