added error message on connection failed