adding outfilename argument to save colored cells properly