update logging and add gui argument