Refined 'save' and 'quit'