WIP: Writing output files.