Fixed bug in order for io redirection.