remove tk import, added debug logging in database.py