Yogesh || Patched to invoke error callback
Yogesh || Fix to allow repeated attempts to open db with valid/invalid credentails