Did you miss closing the file? What about replace this line with:

```python
with open(setup.get_subset(), 'r') as s:
    subset = [l.strip() for l in s]
```