safe current measurement