fix bug when log length reachs the limit
add async logger