if (!is_array($row) || count($row) === 0) {
            throw new Exception("Requested download not found");
        }