Fix global leak of `UnknownFileTypeError`