remove token and rename file