Function asyncRetry