Updated to handle wrong host / wrong credentials