test for using logger default errorhandler with streamwriter