Merge "Add an option to write the trace to a file" into nyc-dev