Add callback in addDatabase function and timeout management

`callback` is never called.