log improvements. first "runnable" version :-)