logging works now, both in gui and cmd