Use `try / finally` to close the input streams.