Added more helpful exception messages.