Use the keystore service instead of the direct file access.

Revert back to my merged change 3710.
2 files changed