Fix #19 Throw appropriate failure messages

Closes #37