improved log module not to grow in mem