Added Token writer and test