core/fsFileSource: close file handles as soon as possible