Improve error messages from overflow.
Fix example so it actually compiles, add better OutputIterator usage and fix try/catch blocks.