added new exception for socket failures so that we dont prematurely give up on this pair (using a different WZ might solve the problem). also added flushing after all outputs so that the logs will better reflect the current state.
added new exception for socket failures so that we dont prematurely give up on this pair (using a different WZ might solve the problem). also added flushing after all outputs so that the logs will better reflect the current state.

hammadmazhar1/ting,hammadmazhar1/ting