cleaning up, closing connection in NonPartInfer on error