Added error/console output redirection