begin writing XYZ output writer