fix logging with level