Only walk entities that match the current file
No need for a newline at the end of file
More robust
Reset entities on each file in a loop