Added console print (including log) function