csv output, better logging