Add diagnostic messages
Simplify self-update code
Improve error messages