[Bug 37940] New: Invalid file buffering behavior causes data corruption