some file writing utils for openpgp format