@Override
	public void append(Element element, String outerBlockNames)
			throws RemoteException {
		String editBlString = null;
	    if(CheckOuterBlockNames(outerBlockNames)){
	    	throw new RemoteException("outerBlockNames is not correct,outerBlockNames ="+outerBlockNames);
	    }
	    if((null == element.toString()) || ("" == element.toString())){
	    	return;
	    }
	    
	    //If there is no index in outerBlockNames, default the first block.
	    if(!outerBlockNames.contains(":")){
	    	outerBlockNames += ":0";
	    }

	    HashMap<String,String> objHashMap=EditCommon(outerBlockNames);
	    String BlockText = objHashMap.get("blocktext");
	    int BlockLength = Integer.parseInt(objHashMap.get("blocklength"));
	    int nblockNameNum = Integer.parseInt(objHashMap.get("nblocknamenum"));
//		System.out.println("BlockLength:"+BlockLength);
//		System.out.println("nblockNameNum"+nblockNameNum);

		RecBlock objRecBlock = new RecBlock();
		objRecBlock.setName(objHashMap.get("lastblockname"));
		objRecBlock.SetBlockText(BlockText);
//		System.out.println(element.toString());
		if(element instanceof Block){
			//check element is directive or block type
			objRecBlock.addBlock((Block)element);
		}else{
			objRecBlock.addDirective((Directive)element);
		}
		editBlString = objRecBlock.toString();
		
		String newConfText = GetPreBlockText(confText,nblockNameNum)+editBlString+"\n"
				+GetSufBlockText(confText,nblockNameNum+BlockLength);

		// write to local conf file
		WriteConf(newConfText);
		WriteRemoteConf();
	}