Ahh, now I understand . . . You just want to add an 's' to a specific filter name.
. . . but you don't seem to be checking if the layerFilter you are renaming actually exists.
I assume you want to batch process drawings, or run this as part of a config routine, but you do realise that Right-click on the Filter name offers a rename option.
Regards,
added:
a piccy if 'Renamed' filter does not exist