Change record() API to not require a trace file name