protect against cache loss if program is halted mid-write