adding reporting for errors (couch) and console.error error