check err in tests