Added logging of failed connections