Return errors as the last result as per idiomatic Go code