fix add logs on rebuild database