add retry on EOF failure