added support for random event behaviour, and specification for the trace file name