Use stderr for docgen errors.
Use stderr for hierarchy also.
Merge pull request #509 from joneshf/docgen-stderr

Use stderr for docgen and hierarchy