Working with docs and CSV output