fix bug of send message, add log