private void PrintToFile(String output,String filename){
		try  
		{
			FileWriter fstream = new FileWriter(filename, true); //true tells to append data.
		    BufferedWriter out = new BufferedWriter(fstream);
			out.write(output);
			out.close();
		}
		catch (Exception e)
		{
		    System.err.println("Error: " + e.getMessage());
		}
	}