1.add some comments for video trace writer
2.revise the main of simulation