Distribution of current in nonequilibrium diffusive systems and phase transitions.