In addition: never let your plugin modify stock files of Unraid, this is asking for trouble.
Unraid supports a system which allows a plugin author to replace a stock page file by a customized version.
Replacement works very simple and ensures that uninstalling the plugin reverts everything to original.
An example
Say you want to make your own version of "DeviceAttributes.page"
This file is stored in /usr/local/plugins/dynamix/DeviceAttributes.page
Your plugin can simply create its own "DeviceAttributes.page" file
Store your file in /usr/local/plugins/myplugin/DeviceAttributes.page
During GUI build the file under "myplugin" is loaded instead of the stock file.
As long as the plugin is installed, the customized version is used, uninstalling the plugin reverts to the stock file automatically.