This is why I suggested to have a test for that.It's `$retry and sleep 1;` so happens only after first retry (which is second try). And sometimes even that is not enough.
Anyway, there is a "sleep 1" in the code, so should not it be enough if the file
persists for only a second?