Refactor a common file finder and reader