Revert "Added process exit if the connection to mongodb doesn't work."

This reverts commit 7bc6bf055b628bfc20b03ab377bbc57fdc2aa352.
Added condition to logging connection to mongodb