Add retry logic that defaults to 5 attempts