Better error catching on collector and reset db.py