add missing token and prefix in Write()