fix: use fs.existsSync
to avoid race condition
#56387
Merged
fs.existsSync
to avoid race condition
#56387