Pause on exit with exception
Invalid XML characters can cause errors