added logging.cpp and .h