replace fmt with log, stdout works