add trace log and correct score bug