added debug decorator to db.py