private static void handle(String argument) {
		System.out.println("Handling '" + argument + "':");

		Path path = Paths.get(argument);

		if (!Files.exists(path)) {
			System.out.println("The file '" + path + "' does not exist.");
			return;
		}

		Element diagram;

		try (XMLParser parser = new XMLParser(path)) {
			diagram = parser.parseDiagram();
		} catch (ParserException e) {
			System.out.println("Error: " + e.getMessage());
			return;
		} catch (IOException | XMLStreamException e) {
			System.out.println("An error occured while parsing the xml file.");
			System.out.println();
			e.printStackTrace();
			return;
		}

		Path imagePath = getImagePath(path);

		try (OutputStream out = Files.newOutputStream(imagePath)) {
			new ImageSaver().save(diagram, out);
		} catch (IOException e) {
			System.out.println("An error occured while saving the image.");
			System.out.println();
			e.printStackTrace();
			return;
		}

		System.out.println("Done writing " + imagePath + "!");
	}