trying to debug database problems