add var to switch write-on-write and write-on-cursor-hold