:worried: 
What would happen if fileStreams is empty?

(I would suggest this)
```scala
fileStreams match {
  case fileStream :: toClose => {
    fileStreams = fileStream :: Nil
    toClose.foreach(_.close())
  }
  case Nil => // Do something
}
```