added error message on failed connection