fix: close streams when import from folder