index update task: close session outside "with context"