added retries after broken pipes