Close input streams to avoid source leaks