code: public void closeFiles() {
          filesAreOpened = false;
          for (HeaderIndexFile<Data> file : files) {
              if (file != null) {
                  file.close();
              }
          }
      }
docs: Closes all files