Added debug output and handling of broken rain data