added logging error codes