add error logging if result of getEvents is null