logging stuff
writing of bytes somewhat works