add close() to some input files