merlin.py: make error messages more user-friendly