Added the tag_file function and test.