Damage risk assessment of building materials with moisture hysteresis