switch logging level when safeguarding