Close pipe to CQP after running commands