fix FileEngine, divergent behavior when debug is off or on
Merge pull request #4768 from darxmac/cache-consistent-behavior

fix FileEngine, divergent behavior when debug is off or on