private String getRemoteRecipe(long ID, String Title, String Brewer, int iteration) {
		try
	    {
			String baseURL = Options.getInstance().getProperty("cloudURL");
			if (!baseURL.startsWith("http://")) {
                baseURL = "http://" + baseURL;
            }
	    	URL url = new URL(baseURL+"/recipes/"+ID);
	    	InputStream response = url.openStream();
	    	
	    	HttpURLConnection huc =  ( HttpURLConnection )  url.openConnection (); 
    	   huc.setRequestMethod ("GET"); 
    	   huc.connect () ; 
    	  
    	   int code = huc.getResponseCode (  ) ;
	    	
	    	if(code != 200) {
	    		JOptionPane.showMessageDialog(null, "Couldn't find the selected recipe (ID "+ ID +")");
        		huc.disconnect();
        		this.close = true;
        		return ""	;
	        	
	    	}
	    	DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

	        dbf.setValidating(false);
	        dbf.setIgnoringComments(false);
	        dbf.setIgnoringElementContentWhitespace(true);
	        dbf.setNamespaceAware(true);
	        // dbf.setCoalescing(true);
	        // dbf.setExpandEntityReferences(true);

	        DocumentBuilder db = null;
	        db = dbf.newDocumentBuilder();
	        //db.setEntityResolver(new NullResolver());

	        // db.setErrorHandler( new MyErrorHandler());

	        Document readXML = db.parse(response);
	      
        	// check if we already have this file
        	String file = Title + " - " + Brewer + " ("+ iteration + ").xml";
        	
        	File recipeFile = new File(currentDir, file);
        	
        	if(recipeFile.exists()) {
        		
        		JOptionPane.showMessageDialog(null, "This file already exists!");
        		return recipeFile.getAbsolutePath();
        		
        	}
        	Debug.print("Writing recipe file: " + recipeFile.getAbsolutePath());
        	// file doesn't exist, lets dump the file 
        	Transformer transformer = TransformerFactory.newInstance().newTransformer();
        	transformer.setOutputProperty(OutputKeys.INDENT, "yes");
        	
        	StreamResult result = new StreamResult(new StringWriter());
        	DOMSource source = new DOMSource(readXML);
        	transformer.transform(source, result);
        	
        	OutputStream oStream = new FileOutputStream(recipeFile);
        	String outXML = result.getWriter().toString();
        	oStream.write(outXML.getBytes(Charset.forName("UTF-8")));
        	oStream.close();
        	return recipeFile.getAbsolutePath();
	        
	    } catch (Exception e) {
	    	e.printStackTrace();
	    	return "";
	    }
	}