ObjectFileWriter now handles multiple closeStream events properly