Added print redirection