Adding better failure xml generation