Replace print with log.msg