code: def set_workdir(self, workdir, chroot=False):
          
          super().set_workdir(workdir, chroot=chroot)
          # Small hack: the log file of optics is actually the main output file.
          self.output_file = self.log_file
docs: Set the working directory of the task.