run snapshot at the very end