added errormessage if connection fails