Fixed CSV output when a layout is found