Ultimately comes down to line 242 of scripts/gen_gpio_defaults.py:
if not os.path.isfile(mag_file):
This line can be removed, but I think it may be better to add a warning before overwriting files, or let the script fail.
if os.path.isfile(mag_file):
print('Warning: Existing file ' + mag_file + ' exists and will be overwritten.')
os.remove(mag_file)
if not os.path.isfile(mag_file):
...
Ultimately comes down to line 242 of scripts/gen_gpio_defaults.py:
This line can be removed, but I think it may be better to add a warning before overwriting files, or let the script fail.