made a new flag to make output to csv optional