main: now print log on stdout if debug mode