check wine prefix before opening registry file and improve wine registry error message
refactoring