Create append to CSV function