Close error file opened by name