Changing print line to log debug.