Better metadata writing when similar data exists