fix log bug in callback function