Implemented IO redirection