.txt file is not being detected as an entity

Im using version:3.1 , when i train the model none of the entities stored in the text file are being detected,

  - lookup: location
    examples: data/locations.txt

the below code also failed to recognize the entities stored in the text file,

  - lookup: location
    examples: 
        - data/locations.txt

but if i do add it individually in the below format, it successfully detects the entity

  - lookup: location
    examples: |
      - san jose airport
      - Texas
      - new York
      - Africa
      - Thailand