close the file on terminfo loading