This class is instantiated in `DistributedObjects` and stored there, i.e. lives throughout the application's runtime. Why would you keep this list around (in `self`) after the file has been written? From what I see it just takes up memory and has no use anymore. If you insist on using a class, why not simply use a single static method (`@staticmethod`, http://docs.python.org/2/library/functions.html#staticmethod) where you generate the file's contents and write it?