adding protection (try/catch) for initial connect