added logfile support