public String generateReply(RPCElement request) {

		String pathFile = "";
		String strResponse = "";
		String messageId = "-1";

		log.debug("Request: ");
		log.debug(request.toXML());

		if (request instanceof Hello) {
			log.debug("Crafting a Hello response.");
			pathFile = helloFile;
		} else if (request instanceof Query) {

			// Check if we want to response errors
			if (responseError) {

				log.debug("Crafting an Error response.");
				pathFile = errorFile;

			} else {
				/* get file configuration */
				Operation oper = ((Query) request).getOperation();
				/* get message ID */
				messageId = ((Query) request).getMessageId();

				if (oper.equals(Operation.GET) || oper.equals(Operation.GET_CONFIG)) {
					log.debug("Crafting an Info response.");
					pathFile = infoFile;
				} else {
					log.debug("Crafting an Ok response.");
					pathFile = okFile;
				}

			}

		}

		log.info("Trying to open " + pathFile);
		try {
			strResponse = FileHelper.getInstance().readStringFromFile(pathFile);
		} catch (Exception e) {
			log.error(e.getMessage());
		}
		// strResponse = deleteStringEndNETCONF(strResponse);
		/* change message ID */
		if (!messageId.equals("-1"))
			strResponse = changeMessageIdNETCONF(strResponse, messageId);

		return strResponse;

	}