modified the document tagger to use os.listdir