save result in CSV file when using command line app