[fix] well the retry values should be in the outer scope
[fix] add a log when we retry