@Override
	public void run() {
		enableLogging = true;
		String rt = null;
		while (enableLogging) {
			if (logs.size() > 0) {
				rt = logs.remove() + "\n";
				try {
					os.writeUTF(rt);
				} catch (IOException e) {
					System.out
							.println("Error: Logger.run(), fail to write " + rt);
					e.printStackTrace();
				}
			} else {
				try {
					Thread.sleep(500);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		}
	}