change csv writer to append