Added logfile support