fix tests, made log optional