protected void stopAgents() {

		// Stop task.
		if(worker != null) {

			try {
				agentPrintMessage("Stopping task...");
				worker.stop();
			} catch (InterruptedException e) {
			} catch (AgentException e) {
			}

		}
		
		if(master != null) {
			try {
				agentPrintMessage("Stopping CA...");
				master.stop();
			} catch (InterruptedException e) {
			} catch (AgentException e) {
			}
		}

		// Stop file system peer.
		try {

			agentPrintMessage("Stopping DFS...");
			fsPeer.stop();

		} catch (AgentException e) {
		} catch (InterruptedException e) {
		}

	}