[Add] Code to remove redundant whitespaces for the output file