fix logging with sudo use