private static void outputtofile(String filename, String theText, boolean append){
		try
		{
			FileOutputStream file = new FileOutputStream(filename, append);
			DataOutputStream out   = new DataOutputStream(file);
			out.writeBytes(theText);
			out.flush();
			out.close(); 
		}
		catch(IOException e)
		{
			System.out.println("Error during reading/writing");
		}
	}