public void shutdown() {
		if (shutdown) {
			return;
		}
		try {
			if (posInWriteBuffer > 0) {
				try {
					annotFile.seek(absoluteWritePos);
					annotFile.write(writeBuffer, 0, posInWriteBuffer);
				} catch (IOException ex) {
					throw new RuntimeException(ex);
				}
			}
		} finally {
			shutdown = true;
			try {
				// Close annotations file.
				annotFile.close();
				
				// Write file names to files.txt.
				PrintWriter pr = new PrintWriter(new File(new File(path), FILE_NAMES));
				for (FileVersion version: files) {
					pr.println(version);
				}
				pr.close();
				
				// Write the identifier names to identifiers.txt.
				pr = new PrintWriter(new File(new File(path), IDENTIFIER_NAMES));
				for (int i = 0; i < identifiers.size(); i++) {
					pr.println(identifiers.get(i));
				}
				pr.close();
				
			} catch (IOException ex) {
				throw new RuntimeException(ex);
			}
		}
	}