private void createFile() {
		copyData();
		
		File dir = new File(Properties.HTML_FILE_PATH);
		File f = new File(dir, title + "_results.html");
		
		if(!dir.exists()) {
			dir.mkdirs();
		}
				
		if(!f.exists() || f.exists()) {
			try {
				f.createNewFile();
				
				FileWriter writer = new FileWriter(f);
				BufferedWriter bw = new BufferedWriter(writer);
								
				tempInfo = "";
				
				headingData = new StringBuilder();
				data = new StringBuilder();
				for(String s : headings) {
					headingData.append("<td>" + s + "</td>");
				}
				
				tempInfo = template.toString().replace("_LINE_", "")
					.replace("<$QUERY>", query)
						.replace("<$DATA>", dataString.toString())
							.replace("<$HEADERS>", headingData.toString());
				
				bw.write(tempInfo);
				bw.close();
				
			} catch (Exception e) {
				ServerLog.logError("Error creating HTML file");
				e.printStackTrace();
			}
		}
		
	}