Add LibError support (resolves issues with no errors during xpcall)
Standardize package check