remove unused log, add logs on unit test and fix bug