add write error log to db