writing csv, printing table or csv