Close fileinputs

Refs #10658.