fix failed tests from e2157fc45b355f27cb50a4f5d0f93efb1df9bb9a - was caused by writing an object (err.stack array) to stderr.write