@Paul-Freeman \r is usually an indicator.
Like your script may have been opened/edited in Windows text editor/notepad, then saved and uploaded to /images/postdownloadscripts/fog.drivers
Why does this matter?
Windows likes to use “CRLF” line endings from the days of “Control Line Feeds” of automated typewriters.
\r\n is the typical sequence that Windows uses for a new line, which sends the line back to the beginning then moves to the next line.
*nix uses \n and tries to use \r as an actual key which is invalid in most scripts.
I might recommend replacing all \r items within the script to \n or '' (empty space)?