         // error - MACH_SEND_INVALID_DEST
         let result = IOServiceClose(conn)
         conn = 0    // Reset this incase open() is called again
+        
+        #if DEBUG
+            if (result != kIOReturnSuccess) {
+                println("ERROR - \(__FILE__):\(__FUNCTION__) - Failed to close")
+            }
+        #endif
+        
         return result
     }
     

                                                
        if (countElements(key) != SMC.SMC_KEY_SIZE) {
            #if DEBUG
                println("ERROR - \(__FILE__):\(__FUNCTION__) - INVALID KEY"
                        + " SIZE")
            #endif
            return (ans, kIOReturnBadArgument, kSMC.kSMCError.rawValue)
        }

                                        
        // Find the service
        let service = IOServiceGetMatchingService(kIOMasterPortDefault,
                      IOServiceMatching(IOSERVICE_MODEL).takeUnretainedValue())

        if (service == 0) {
            #if DEBUG
                println("ERROR - \(__FILE__):\(__FUNCTION__) - " +
                        "\(IOSERVICE_MODEL) service not found")
            #endif
            return model
        }
