                                     break
                                 }
                             }
-                            NSLog("%@", "Next potential host: \(nextHost)")
+                            DLog("%@", "Next potential host: \(nextHost)")
                             
                             // If the current item is the next in line, convert it to a host
                             if myPeerId == nextHost {
-                                NSLog("%@", "my peer is the next host")
+                                DLog("%@", "my peer is the next host")
                                 // Convert current item into a host
                                 self.session.host = myPeerId
-                                NSLog("%@", "New host \(self.session.host?.displayName)")
+                                DLog("%@", "New host \(self.session.host?.displayName)")
                                 stopSearchingForHosts()
                                 startAdvertisingHost()
                             }

    // Disconnect from current session, browse for another host
    public func disconnect() {
        session.disconnect()
        NSLog("%@", "disconnected from \(session.hashValue)")
    }
    
    // This method is async
    public func sendData(data: NSData, mode: MCSessionSendDataMode) -> Bool {
        do {
            NSLog("%@", "send data to host: \(data)")
            try session.sendData(data, toPeers: session.connectedPeers, withMode: mode)
        } catch {
            NSLog("%@", "send data failed: \(data)")
            return false
        }
        
        return true
    }
}


                    // Combine with peersInSession count > 1, we can be certain that
                    // self is disconnected.
                    if self.session.connectedPeers.isEmpty && self.session.peersInSession.count > 1 {
                        DLog("%@", "Self was removed")
                        self.session.peersInSession.remove(myPeerId)
                        delegate?.disconnectedFromSession()
                    } else {
                        DLog("%@", "Self was not removed")
                        DLog("%@", "Current host: \(self.session.host)")
                        
                        // If the removed item is the current host
                        if self.session.host == peerID {
