add context builder
extend buildContext method
add basic lock for sqlite