         
         switch (type) {
         case .tString:
-            var stringDataUTF8 = (decoder.decodeObjectForKey("0") as! NSData)
+            let stringDataUTF8 = (decoder.decodeObjectForKey("0") as! NSData)
             stringData = NSString(data:stringDataUTF8, encoding: NSUTF8StringEncoding) as? String
         case .tStringExternal:
             // read file later, at this point the file UUID is not known

        if (!isNil) {
            switch (type) {
            case .tString:
                var stringDataUTF8 = stringData!.dataUsingEncoding(NSUTF8StringEncoding)
                
                if (stringDataUTF8 != nil) {
                    // println("\(stringDataUTF8!.length)")

        set {
            if stringData != newValue {
                
                if let newValue = newValue {
                    // get size of encoded string
                    if newValue.utf8.count > maxStringLength {
                        type = .tStringExternal
                    } else {
                        type = .tString
                    }
                } else {
                    type = .tNIL
                }
                
                dirty = true
