remove defer close file