public static void handleImage(URL url, String rootFolder) throws FileReceiveException {
		File outputfile = null;
		try {
			// System.out.println(url);
			outputfile = new File(String.format("%s%s", rootFolder, getFilename(url)));
			// System.out.println(outputfile);
			if (outputfile.isFile()) {
				throw new FileReceiveException(outputfile.getName(), String.format("File %s allready exists.", outputfile.getName()), false);
			}
			URLConnection openConnection = url.openConnection();
			openConnection.setRequestProperty("User-Agent", USER_AGENT);
			BufferedImage bufferedImage = ImageIO.read(openConnection.getInputStream());
			if (bufferedImage == null) {
				throw new FileReceiveException(outputfile.getName(), String.format("Unknow Exception for file %s.", outputfile.getName()), false);
			}
			ImageIO.write(bufferedImage, getFiletype(url), outputfile);
		} catch (Exception e) {
			// e.printStackTrace();
			throw new FileReceiveException(outputfile.getName(), String.format("File %s was not found.", outputfile.getName()), true);
		}
		/*
		 * URLConnection connection = url.openConnection();
		 * connection.setDoOutput(true); connection.setDoInput(true);
		 * sendRequest(connection, url); InputStream inputStream =
		 * connection.getInputStream(); // receiveResponse(inputStream); long
		 * start = System.currentTimeMillis();
		 */
		/*
		 * int bytesRead; int current = 0; byte[] mybytearray = new
		 * byte[130651]; FileOutputStream fileOutputStream = new
		 * FileOutputStream(getFilename(url)); BufferedOutputStream
		 * bufferedOutputStream = new BufferedOutputStream(fileOutputStream);
		 * bytesRead = inputStream.read(mybytearray, 0, mybytearray.length);
		 * current = bytesRead; do { bytesRead = inputStream.read(mybytearray,
		 * current, (mybytearray.length - current)); if (bytesRead >= 0) current
		 * += bytesRead; } while (bytesRead > -1);
		 * bufferedOutputStream.write(mybytearray, 0, current);
		 * bufferedOutputStream.flush();
		 */
		/*
		 * long end = System.currentTimeMillis(); System.out.println(end -
		 * start);
		 */
		// bufferedOutputStream.close();
	}