@Override protected Boolean doInBackground() { try { if (!upToDate()) { String installPath = OSUtils.getDynamicStorageLocation(); ModPack pack = ModPack.getSelectedPack(); pack.setUpdated(true); File modPackZip = new File(installPath, "ModPacks" + sep + pack.getDir() + sep + pack.getUrl()); if (modPackZip.exists()) { FileUtils.delete(modPackZip); } File animationGif = new File( OSUtils.getDynamicStorageLocation(), "ModPacks" + sep + pack.getDir() + sep + pack.getAnimation()); if (animationGif.exists()) { FileUtils.delete(animationGif); } erroneous = !downloadModPack(pack.getUrl(), pack.getDir()); } } catch (IOException e) { e.printStackTrace(); } return true; }