Fix write keys with passphase