refactor token file format