[#2212] CID25895:

Refactor to avoid TOCTOU problem