error logging related: add error code