auto retry if write failed