you should use sprintf to inject the file name in the exception message (and use single quoted strings) to be consistent with other parts of the library.

And I would use ``UnexpectedValueException`` here (which is child of ``RuntimeException`` btw), as it is clearly the kind of cases for which it is intended to be used