Changed the way error handling works for RegEdit