Utility method for saving key stores