retry to get the document if it fails