Allow locking to be disabled via config or on the fly. Fixes issue #27