Added ability to switch on/off the direct chunk write