[FileIO] Make readTINFile() more robust.