Trying to capture the events with the right names to save in a txt file directly