added stdout/stderr temporary redirection