Implemented output redirection