Fix detection of closing parenthesis of functions
Use addError native string formatting.