fixed run_on_write option

Thanks for fixing the open_loc option, it works like a charm now.  Try pulling this change too, should fix the run_on_write option.