refactoring error message handling - 11 - almost done - backup check ind before renaming variables and templates