Fix for different xml and add some logging