Had to modify I/O redirection to support older versions of Bash.