read_file: replace $versions->{$filename} with $cver