adding switch to turn write buffering on/off (*buffer-writes*) and exporting it