added exception for connection error