Improve file detection / conversion during spec update

I know this line is not changed here but it's really hard figure out what we're setting and what the value is coming from.