implemented error handing for incorrect passphrases