close the stdout of the opt tool