Effect of thermal noise on current-voltage characteristics of Josephson junctions