Fixed XMLManager to create properly xml files