fix event logging, stdout doesn't work