use log function instead of fmt.Sprintf