Thermal effects and diamagnetic response of a current-carrying YBCO film