Close opened streams in tests