MS crash

Dear all,
I have a trajectory of 1 lakh frames.When I use Build->Mesostructure->Coarse grain tool .When I use a perl script to convert each frame with atoms to a frame with bead,MS crashes.
Is there an option to rectify this run time error?

Thanks in advance,
Deepa