made token file an argument