private void writeFile(String data, boolean isAppend) {
		if (!exists()) {
			try {
				createNewFile();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		BufferedWriter bfWriter = null;
		try {
			FileWriter flWriter = null;
			if (isAppend) {
				flWriter = new FileWriter(this, true);
			}
			else {
				flWriter = new FileWriter(this);
			}
			bfWriter = new BufferedWriter(flWriter);
			if (isAppend) {
				bfWriter.newLine();
			}
			bfWriter.write(data);
			bfWriter.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			try {
				if (bfWriter != null) bfWriter.close();
			} catch (IOException ex) {
				ex.printStackTrace();
			}
		}
	}