convert tag from code to file