move host setting existence check inside block determining whether to treat this as a local command