Better error message for registry access