logging stuff for emulator