first pass at addressing issue #14 - refactoring error reporting.