Mechanisms of magnetic and temperature hysteresis in ErFeO3 and TmFeO3 single crystals