TST Test writing of metadata files