Fix cache file magic number check