only return err if there is in fact an err