I wonder if a reusable stream can be used here, similar to how it's done in TextProjectDatabaseWriter?