Completed open, close, and print in event.c