Write out product database when product is deleted.