Use testing.Errorf instead of Error when printing a formated string