Added ability to export the results in csv format.