Improve reliability of thumbnailing near end of file.