seperate concerns between file parse and code parse

A common use case is to only use contents parsing instead of file path parsing. This patch separates concerns between reading file path and parsing contents.