Added global log to functions with log object