added logfile for stats