If this was a corrupted file, it's possible that `d->fileSize` would be corrupted as well. It would be good to check both against `File::length()`.