logging functions moved to util file