add load error functionality in shim, (needs testing) @sbezboro @brianr