Throw exception if file size in header doesn't match actual file size