Formated output to csv