change cleanChux to write stdout instead of file