Added error when can't connect