Added exception handling and fixed at bat result

We need to look into why an exception was thrown regularly because tags
in the xml document weren't closed...