Check return of PEM_write_* functions and report possible errors