Improve error messages

references #35