Fix redirect output (#320).