open and close csv file