Improve Session GC for files driver

Close #3701
1 file changed