write to csv.gz instead of es