Close input file immediately after last using.