add error log to DB