public static void deleteDir(File f) throws Exception {
		if (f.isDirectory()) {
			for (File c : f.listFiles()) {
				deleteDir(c);
			}
		}
		if (!f.delete()) {
			throw new IOException("Failed to delete file: " + f);
		}
	}