Also, I did try to make clear that the given code was created 'for a specific use case in which I knew' that the format of the input files was tightly defined.