move simple logger to dbg.h