fix closing file twice