Converted to try with resources in Parser.parseFile