add stdout redirection