fix: write identity to file as well