replace fmt usage with log