[DEV] add control before closing buffer not saved... (not ended)