[WIP] Fixed loading xml source and improved error messages

TODO
- [ ] Add tests