public void run() throws InterruptedException, UnknownHostException,
			IOException {

		 PrintWriter logWriter = new PrintWriter(new File("log" + id +
		 ".log"));
		 logWriter.write("Client Type: " + type + "\n");
		 logWriter.write("Client Name: " + id + "\n");
		 logWriter.write("rSeq\tsSeq\toVal\n");

		int accessCounter = accessNumber;
		while (accessCounter-- > 0) {
			System.out.println("Client: try to connect to Server "
					+ serverAddress + " " + serverPortNumber);

			final int proccessedNews;

			final String response;
			if (type.equalsIgnoreCase(ServerClientUtils.READER)) {
				// reader
				response = remoteObject.getNews(id);
				proccessedNews = Integer.valueOf(response.split(" ")[1]);
				System.out.println("Client " + id + " read " + proccessedNews);
			} else {
				// writer
				proccessedNews = new Random().nextInt(100);
				response = remoteObject.setNews(id, proccessedNews);
				System.out.println("Client " + id + " write " + proccessedNews);
			}
			System.out.println("Client " + id + " recieve response " + response);
			 logWriter.write(response.replaceAll(" ", "\t\t") + "\n");

			if (accessCounter != 0) {
				Thread.sleep(new Random().nextInt(SLEEP_TIME));
			}
		}
		 logWriter.close();
	}