Master client retry throw

Made it so master client and worker throw IOException when any TException is thrown. This is needed to prevent the inifi loop issues that we have faced in the past.