Only write group metadata when there is metadata