Integrated template loading from messages to hooks

Handling both success and failed cases of missions