Setup logging in data.py, fix a unicode issue.