parse & write csv format file