Recent development and application of a new safety analysis code for fusion reactors