private void checkFiles(boolean useLogFile, String fileName, String infix, int count) {
   for (int i = 1; i <= count; i++) {
     String versionedFileName = fileName + infix + i;
     if (VERBOSE) {
       System.out.println("Checking " + versionedFileName);
     }
     ObjectContainer oc = Db4o.openFile(baseConfig(useLogFile), versionedFileName);
     try {
       if (!stateBeforeCommit(oc)) {
         if (!stateAfterFirstCommit(oc)) {
           Assert.isTrue(stateAfterSecondCommit(oc));
         }
       }
     } finally {
       oc.close();
     }
   }
 }
 private void assertName(EmbeddedConfiguration config, String expected) {
   EmbeddedObjectContainer db = Db4oEmbedded.openFile(config, FILE_NAME);
   Assert.areEqual(expected, db.toString());
   db.close();
 }