removed extra line
chanaged to use default safe mode based on connection type.
added connection type and changed mode to use strings