Bug fix: error handling between lib and CLI. fixes #4