Split messages and events into two different files