add test for redirect_stderr and example