Improve potential error messages.