Close input streams to avoid source leaks  (by valid)