close mongodb connection clearly