checkAndJoinBridge :: String -> String -> IO Bool
checkAndJoinBridge bridge interface = do
    curBridge <- memberOf interface
    case (null curBridge, curBridge == bridge) of
         (True,_) -> do joinBridge bridge interface
                        return True
         (_, True) -> do debug $ printf "%s is already added to %s" interface bridge
                         return True
         (_, False) -> do error $ printf "%s cannot be added to  %s when it is already added to %s"
                          return False
checkAndJoinBridge :: String -> String -> IO Bool
checkAndJoinBridge bridge interface = do
    curBridge <- memberOf interface
    case (null curBridge, curBridge == bridge) of
         (True,_) -> do joinBridge bridge interface
                        return True
         (_, True) -> do debug $ printf "%s is already added to %s" interface bridge
                         return True
         (_, False) -> do error $ printf "%s cannot be added to  %s when it is already added to %s"
                          return False
checkAndJoinBridge bridge interface = do
    curBridge <- memberOf interface
    case (null curBridge, curBridge == bridge) of
         (True,_) -> do joinBridge bridge interface
                        return True
         (_, True) -> do debug $ printf "%s is already added to %s" interface bridge
                         return True
         (_, False) -> do error $ printf "%s cannot be added to  %s when it is already added to %s"
                          return False