added quit confirmation dialog