Improved error messaging

Sort of.