hack in some debug
Throw more useful error
Merge pull request #41 from matthew-andrews/debug

Throw more useful error