private void cleanUpExtractDir(final Path extractDir) {
        try (final DirectoryStream<Path> directoryStream = Files.newDirectoryStream(
                extractDir, "lmdbjava-native-library-*.so")) {

            for (final Path redundantLibraryFilePath : directoryStream) {
                LOGGER.info("Deleting redundant LMDB library file "
                        + redundantLibraryFilePath.toAbsolutePath().normalize());
                try {
                    Files.deleteIfExists(redundantLibraryFilePath);
                } catch (IOException e) {
                    LOGGER.error("Unable to delete file " + extractDir.toAbsolutePath().normalize(), e);
                    // swallow error as these old files don't matter really
                }
            }
        } catch (IOException e) {
            throw new RuntimeException("Error listing contents of " + extractDir.toAbsolutePath().normalize());
        }
    }
Relies on this class being a singleton
stroom-lmdb/src/main/java/stroom/lmdb/LmdbLibrary.java