Generating SGeMS file