Refactor to decouple need for blank file in parsing individual lines