expanded error codes, more debugging info