             let success = fileManager.removeItemAtPath(path, error:&error)
             if (success) {
                 if let attributes = attributesOpt {
-                    self.size -= Int(attributes.fileSize())
+                    self.size -= attributes.fileSize()
                 }
             } else {
                 println("Failed to remove key \(key) with error \(error!)")

                Log.error("Failed to write key \(key)", error)
            }
            if let attributes = previousAttributes {
                self.size -= Int(attributes.fileSize())
            }
            self.size += data.length
            self.controlCapacity()
        } else {
            Log.error("Failed to get data for key \(key)")

            let modificationDate = attributes.fileModificationDate()
            let fileSize = attributes.fileSize()
            if fileManager.removeItemAtPath(path, error: &error) {
                self.size -= fileSize
            } else {
                Log.error("Failed to remove file", error)
            }
