Small improvements to doTry, retry, and local implementations