added error reporting controll for unit test