A great analogy for this would be along the lines of don’t put your hands in the hive if you don’t want to get stung!
In other words, be extremely careful in modifying the built-in SharePoint files.
Except for a few well-defined files such as the web.config or docicon.xml files, you should never modify the built-in files included with SharePoint Products and Technologies except through official supported software updates, service packs, or product upgrades.
This type of customization is not supported.
Modifying the files that are installed by SharePoint is not supported. However, there are some scenarios in which you may have to modify these files to achieve consistent branding or other customizations. When you modify these files, you must consider that they may be replaced by future updates and service packs. Additionally, there may be complications when you upgrade to later versions of the product. Keep backup copies of all customized files in case they are overwritten by an update. Product support will provide commercially reasonable support for help with modifications but will be unable to provide product changes or hotfixes that result from modifying the files that are installed by SharePoint.