But then maybe your TextProjectDatabaseWriter.writeProjectDatabase() should also take a stream rather than file? So that the PDB can potentially be written e.g. over the network, etc.