add close file codes