introducing FileGetSlice, plus resulting refactoring