file close functions to handle list of files.