Decouple writing and reporting and start implementation of nested writing