fix Bug:

update outputMessage sample.
fix the check for replaceMap situation.