Added code to preprocess the events file to be able to replay without manual edits.