IMP Bug Fix: in closerel() writerec is used to edit relcat entry. Now it is successfully editing and showing new numRecs after creating a relation and printing relcat.
g_cache_dirty[i] is removed as it represent the same as that of g_catcache[i].dirty.