proper use of fmt.Errorf