adding retries with delay when trying to get attachment.