Effect of thermal conduction and radiation on the dynamics of a flaring coronal loop