Do not write the definition.xml on error & improve error handling.

- The definition.xml should not be touched when there are any errors.
- When errors happen, we should write to the error_log but catch them and show
the user a portal message.

Fixes #7
Update German translations.