catch os connection errors