checkAndLeaveBridge :: String -> String -> IO Bool
checkAndLeaveBridge bridge interface = do
    curBridge <- memberOf interface
    if (curBridge == bridge)
       then do leaveBridge bridge interface
               return True
       else do error $ printf "%s is not on %s bridge" interface bridge
               return False
checkAndLeaveBridge :: String -> String -> IO Bool
checkAndLeaveBridge bridge interface = do
    curBridge <- memberOf interface
    if (curBridge == bridge)
       then do leaveBridge bridge interface
               return True
       else do error $ printf "%s is not on %s bridge" interface bridge
               return False
checkAndLeaveBridge bridge interface = do
    curBridge <- memberOf interface
    if (curBridge == bridge)
       then do leaveBridge bridge interface
               return True
       else do error $ printf "%s is not on %s bridge" interface bridge
               return False