Added logfile feature