Change a bit the skip_error method to allow set on/off and restore the previous value

Signed-off-by: emanuele <emanuele45@gmail.com>