Merging Rain and handling exceptions, plus small correction in reducer4 last if() statement