simple,configurable check to exit on failed tcp writes