CHOP-29. Added support for local mode.

@renuka @lockoff.