db size checks
replaced returns with console.error
enforce database size limit