[YMK] bugfix and refine message output functions