Update messages.py

Improved error messages.