Bugfixes, better DEBUG and resume feature in bulk template update.