added initial tomd code and logging support