Added logfile creation.