Pass Strings as a reference instead of copying it and re-add the 3 curly braces to errorMessage