Added mongo check function. required mongoose and created connections