Convert XML parser die to an Exception and catch it

Other XML issues seem to be handled, logged and return -1 except the case when there are duplicate entries in a config which causes the script to die.