private function getArgs(array $args, $cmd, $response, $driverId)
    {
        $response = array($response);
        $allowedArgs = $this->commands[$cmd];
        unset($allowedArgs['interface']);
        foreach ($allowedArgs as $key => $value) {
            if (isset($args[$key])) {
                $response[$key] = $args[$key];
                if (isset($this->filenameInRequest[$key])) {
                    $response[$key] = self::getNameByTarget($args[$key], $driverId);
                } elseif ($key == 'targets') {
                    $response[$key] = array_map(
                        function ($val) use ($driverId) {
                            return self::getNameByTarget($val, $driverId);
                        },
                        $args[$key]
                    );
                }
            } elseif (isset($this->defaultValues[$key])) {
                $response[$key] = $this->defaultValues[$key];
            } elseif ($value) {
                $this->error(sprintf('parameter "%s" in cmd "%s" required', $key, $cmd));
            }
        }

        return $response;
    }