Added logging preceding assertion in database.cpp for exceeded quotas