Replaced appendFormat with appendString for performance concern.