add logging for connection errors (should probably report them to user too)