public void print() {

       // check if read in
       if(!treeHeader.isHeaderOK()){
            int badMagic = treeHeader.getMagic();
            log.error("Error reading B+ tree header: bad magic = " + badMagic);
           return;
       }

        // print B+ tree header
        treeHeader.print();

        // print  B+ tree node and leaf items - recursively
        if(rootNode != null)
            rootNode.printItems();
   }