Added a bit of error messaging.