code: def write (self, s, **args):
          
          if self.filename is not None:
              self.start_fileoutput()
          if self.fd is None:
              # Happens when aborting threads times out
              log.warn(LOG_CHECK, "writing to unitialized or closed file")
          else:
              try:
                  self.fd.write(s, **args)
              except IOError:
                  msg = sys.exc_info()[1]
                  log.warn(LOG_CHECK,
                      "Could not write to output file: %s\n"
                      "Disabling log output of %s", msg, self)
                  self.close_fileoutput()
                  self.fd = dummy.Dummy()
                  self.is_active = False
docs: Write string to output descriptor. Strips control characters
          from string before writing.