feat: improved error handling, added separate DB for locks