fixed issue when logging a long message