Created db manager, fixed some bugs in logger and db initiator, added first time startup check