Temperature dependence of the persistent critical current and instabilities in MgB2 thin films