When working with open source CMS distributions, never edit the core files. Keep your changes to the modules and override functionality with the built in methods. Most CMS's will provide ways to change things this way.
If you do edit a file somewhere, consider whether it's a change that everyone could benefit from. If so, submit it to the CMS project for inclusion else, revert your changes and find another way around.
If you don't heed this then the chances are you're in for a heap of pain when maintaining.