docs: def setLogFile(self, filepath):
          """ Defines the file to which output log messages should be sent.
  
          Set to `None` to print to STDOUT instead.
          """
          if filepath is None:
              self._log_file = None
              return
          parsed_path = os.path.abspath(filepath)
          # Checks if the provided log filename is in a real directory, and that
          # the filename itself is not a directory.
          if os.path.isdir(os.path.dirname(parsed_path)) and not os.path.isdir(parsed_path):
              self._log_file = parsed_path
          else:
              raise IOError("File not found: " + filepath)