protected function cleanup($return = null, $output = null): void
    {
        // Restore working directory
        if ($this->dir !== null) {
            @chdir($this->currentdirectory);
        }
    }