Now using html emails and fixed a bug when results file was empty