Is there anyone who has encountered this issue before?
Not on Earth, but then again no one has ever made a parser that seeks .*.
Firstly, don’t do this. It matches 0 or more of any character, which means at the end of the file it can still keep matching things.
If you want to test it, just use ..
Even if that does not fix the problem, you should be able to fix it by loading the file manually and sending it as a byte stream. This is really better practice anyway for parsers and certainly a habit into which you will want to get for loading all types of things in the future.