[backend] .spec typo
[keygen] improved exception handling