private static void ensurePackages(File pkg) throws IOException {
  if (!pkg.exists() && !pkg.mkdirs())   throw new IOException("Failed to create folders for package: " + pkg);
}

private static void ensurePackages ( File pkg ) throws IOException { if ( ! pkg . exists ( ) && ! pkg . mkdirs ( ) ) throw new IOException ( "Failed to create folders for package: " + pkg ) ; }
ensure that all folders for packages exist .
