Add close_files() that closes all files