Add quit logic to database update script