CSV output is now working