Added fixes in case ScriptCam cannot establish connection