add retry count to handle i/o errors caused by concurent write