fixed bug in writing output file for Suman