add single line msg
rewrite print msg with dot code to suit for variable length