Improved bson serialization handling for save method
do not dispose ejdb-instance handle if open database faild