Added event registration for output creation