The data is written to <fn>.tmp in the same directory as the target and moved to <fn> on Commit(); a failed or interrupted write leaves the previous file untouched, with an orphaned .tmp.