now writes the input catalog.