Closing mongo db connection to prevent connection pool from getting exhausted