public File getFile(String IPAddress, String fileName) {
		PrintWriter pw = null;
		Socket ftSoc = null;
		BufferedReader br = null;
		PrintWriter pwFile = null;
		File newFile = null;

		try {
			ftSoc = new Socket(getInetAddress(IPAddress), ConfigurationManager
					.getInstance().getFileTransferPort());
			pw = new PrintWriter(new BufferedWriter(new OutputStreamWriter(
					ftSoc.getOutputStream())));
			logger.debug("Successfully opened socket for file transfer");

			Request fileDownloadRequest = new Request();
			CommandRequestType cmd = new CommandRequestType();
			FileDownloadType fd = new FileDownloadType();
			FileDownloadParams fdp = new FileDownloadParams();
			fdp.setFileName(fileName);
			fd.setParams(fdp);
			cmd.setFileDownload(fd);
			fileDownloadRequest.setCommand(cmd);
			
			pw.println(edu.ncsu.csc573.project.common.messages.RequestMessage.getXML(fileDownloadRequest));
			pw.flush();
			/*pw.println("<Request>");
			pw.println("File:" + fileName);
			pw.println("</Request>");
			pw.flush();*/
			logger.debug("Sent request " + "File:" + fileName);
			br = new BufferedReader(new InputStreamReader(
					ftSoc.getInputStream()));
			String buff;
			newFile = new File(ConfigurationManager.getInstance()
					.getDownloadDirectory(), fileName.substring(0,
					fileName.indexOf("."))/* +"_"+System.currentTimeMillis() */
					+ ".txt");

			pwFile = new PrintWriter(
					new BufferedWriter(new FileWriter(newFile)));

			while ((buff = br.readLine()) != null) {
				pwFile.println(buff);
				pwFile.flush();
				logger.trace("Read: " + buff);
			}
			pwFile.flush();
			logger.info("Successfully saved downloaded file at "
					+ newFile.getAbsolutePath());
			pw.println("a");
			pw.flush();
		} catch (UnknownHostException e) {
			logger.error("Unable to find host", e);
		} catch (IOException e) {
			logger.error("Unable to perform IO", e);
		} catch (Exception e) {
			logger.error("Unable to get file", e);
		} finally {
			if (ftSoc != null) {
				try {
					ftSoc.close();
				} catch (IOException e) {
					logger.error("Unable to close socket", e);
				}
			}
			if (pw != null)
				pw.close();
			if (pwFile != null)
				pwFile.close();
		}
		return newFile;
	}