Close fileinputs.
Merge pull request #10987 from cachedout/10658

Close fileinputs