DietPi used rc.local for own scripts until v6.2, thus all our images have an already enabled/functional rc.local implemented. From v6.3 we switched to an own service for DietPi scripts, but left rc.local in place for users who used it for their own scripts as well.
From v6.5 on fresh images will not touch rc.local (nor the underlying services) at all, thus in most cases users need to enable it by themselves. But this doesn't effect existing/upgraded servers.
And back to your issue:
- It is indeed the wildcard "*" within echo target file name. I just tried it on my Stretch VM an found exactly the same error message, where without wildcard it worked well

- So depending on if the fan device has fixed or not, go with k-plans or my last command suggestion.