Add a serialization check after parsing
-rwxr-xr-x 41939 gpg-migrate.py