improve error messaging.