Bad End can only be triggered once. So if you for some reason hook that action back to your main action/loop the template will fail next time it reaches a bad end.
To see what went wrong, create some alerts in order to log the process of the steps your template's taking.