Added methods for set and append of error
Refractored code for token with new error methods