Run callback before emitting events