improve error reporting in sanity checks (#48)
Merge pull request #53 from Trott/improve-error-reporting

improve error reporting in sanity checks (#48)