printMsg() and log improved