public static String getFileName(String name, String dir) {
		String fileName = name;
		if(exists(name, dir)) {
			for(int i = 1; i < 100000; i++) {
				String constructed = name + "("+i+")";
				if(!exists(constructed, dir)) {
					fileName = constructed;
					break;
				}
			}
		}
		return fileName;
	}