moved error log to mocha