public static void toFile() {
		try {
			
			BufferedWriter writer = new BufferedWriter(new FileWriter(
					Config.out + "." + Config.format));

			
			if (Config.verbose >= 1) {
				System.out.println("Generating File : " + Config.out + "."
						+ Config.format);
			}

			
			
			switch (Config.format) {
			case "dot":
				writer.write(ArbresToDot(Config.finalList, Config.out));
				writer.close();
				break;
			case "txt":
				writer.write(ArbresToText(Config.finalList));
				writer.close();
				break;
			case "json":
				System.out.println("not yet");
				writer.close();
				break;

			case "png":
				writer.write(ArbresToDot(Config.finalList, Config.out));
				writer.close();
				dotGenerator();
				break;
			default:
				System.err
						.println("unsupported format will generate the default format instead");
				writer.write(ArbresToDot(Config.finalList, Config.out));
				writer.close();
				dotGenerator();
				break;
			}

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}