writing keystores to disk