Added output.xml generation code