     let blockSize = sizeof(H) + sizeof(D)  // test as CUnsignedLongLong
     
     public var error: NSError?  // readonly?
+    var errorOccurred = false
     
     var url: NSURL!
     var fileHandle: NSFileHandle!

        
        if !url.isFileExisting() {
            
            self.createNewFile()
            
            // TODO  add error handling
            // - out of memory
            // - no access
            //
            newFile = true
        }
        
        self.fileHandle = NSFileHandle.fileHandleForUpdatingURL(url, error: &self.error)
        self.endOfFile = self.fileHandle.seekToEndOfFile()
        
        // central check of there store need an init
        // or a existing store need to read configuration
        if self.newFile {
            initStore()
        } else {
            readStoreConfiguration()
        }
    }
    
    deinit {
        self.fileHandle.closeFile();
    }
    
    // override in subclasses

        let firstChar = "X"
        var data : NSData! = firstChar.dataUsingEncoding(NSUTF8StringEncoding)
        
        // TRUE if the operation succeeds, otherwise FALSE.
        return data.writeToURL(self.url, options: .DataWritingAtomic , error: &self.error)
    }
    
    // override in subclasses
    // This method is called only if the file is new and no error is occurred
    // The intension is to write the datablock number 0
    func initStore() {
        
