add some comments and add a core dump try code