RT2932: Catch write errors

Don't ignore the return value when writing PKCS7.