@OyyoDams -D is used to specify the driver type.
We can see in this documentation https://wiki.archlinux.org/index.php/wpa_supplicant#Manual,
"west" driver is deprecated even if it's the best solution for wide compatibility.
I think, the best solution is to update the script to changed the driver argument when the connection fails with a wrong driver issue.