Fix warning: close input stream.