Improve error messages

When reading/writing files or XML parsing fails, give more details.
Merge pull request #119 from frankosterfeld/error_messages

Improve error messages