Where actually is the dfx idendity pem file?

When I try out Ed25519KeyIdentitywith exact same code as above and the same .pem file I get an error:

Error: bad secret key size

P.S.: Linked forum posts about the same subject 6169 and 9456