additional locale stuff, moved logging