close file handle only on remove