This function will never return a non-nil error. Intended?