Added context exit callback