added logging module and some use of logging macros in brd.c