move logging functions to helper file
use logging functions in helper file