write .gz files