added Exception when connection failed