saving current settings when app going to pause