Fix metadata types, write as any requested output format