Fix unicode bug
Add logging before random statement