logging for 'close'