fixed I/O redirection
Merge pull request #18 from FengxiaoYuan/master

fixed I/O redirection