fix close logging