updated with the ability to use an afterCompletion to notify the recovery module when the branch completes