Added delivery function callback for every message