fixed I/O redirection