[+] merge unittests
[+] fix issue when db file removed before thread is dead