write to xml done