Replace FileExists (which uses "stat") with PathFileExists