As an addendum, I would pass the parsed contents of the file path, this will make the code easier to re-use and easier to test.