used popen3 to block standard output