Careful planning minimizes impact of closing Minn. social service agency