When using multithreading in PNL TBSS pipeline (github.com/pnlbwh/TBSS/) - "ValueError: I/O operation on closed file."