private static void dumplist(Collection<Resource> list, String fn) {
		try {
			if (fn != null) {
				Writer w = new OutputStreamWriter(new FileOutputStream(fn),
						"UTF-8");
				try {
					Resource.dumplist(list, w);
				} finally {
					w.close();
				}
			}
		} catch (IOException e) {
			throw (new RuntimeException(e));
		}
	}