This should be more robust and allows us to handle new versions of the file format if the library supports it.