CHOP-29. Added support for local mode.

Signed-off-by: Kiyan Ahmadizadeh <kiyan@wibidata.com>