prepare log output.
remove debug print and simplify WB code.