Refactoring. Extract function to read config/event file.