Refactored CommitReleaseTask to integrate rollback behaviour.