Fix thumbnail file format corruption