Tweak demo security setting
fix nil error if cert file is nil