private static String getEmptyTempFile(String dir) {
		Random r = new Random();
		String name = null;
		File f = null;
		do {
			name = (dir.equals("") ? "" : dir + "/") + "_temp_" + Math.abs(9272334 * r.nextInt());
			f = new File(name);
		} while(f.exists());
		return name;
	}