moving logging helpers to logging module