Invalid comparison of a string and StringBuilder object results in empty StdErr string being stored in globalMap