enable main() function to write csv files of samples