Add 5 retries for socket read/write
Minor fix