trace: Add trace-file command to open/close/flush trace file