Code for writing multiple cmd files added