To fix other problems I deleted our custom file and replaced it with the default file just to check errors. If I replace (or remove and let it use default) this file I still get the same error
You could follow your process for the other files you have altered to locate the offending file. Once located if you can determine the cause, great or you can then post the file contents or the lines that you have altered for specific assistance.