Add more database debugging