public static boolean extractFile(File zip, File output, String fileName) throws IOException, InterruptedException {
        if (!zip.exists() || fileName == null) {
            return false;
        }

        ZipFile zipFile = null;

        try {
            zipFile = new ZipFile(zip);
            ZipEntry entry = zipFile.getEntry(fileName);
            if (entry == null) {
                Utils.getLogger().log(Level.WARNING, "File " + fileName + " not found in " + zip.getAbsolutePath());
                return false;
            }
            File outputFile = new File(output, entry.getName());

            if (outputFile.getParentFile() != null) {
                outputFile.getParentFile().mkdirs();
            }

            unzipEntry(zipFile, zipFile.getEntry(fileName), outputFile);
            return true;
        } catch (ZipException e) {
            e.printStackTrace();
            throw new ZipException("Error extracting file " + zip.getName());
        } catch (IOException e) {
            Utils.getLogger().log(Level.WARNING, "Error extracting file " + fileName + " from " + zip.getAbsolutePath());
            return false;
        } finally {
            if (zipFile != null) {
                zipFile.close();
            }
        }
    }