Add lots of debug output
Add debug package
Handle errors in examples
gendocs