notebook is automatically saved when leaving