working yaml writer