close mongodb connection