The initialization method should wait until the key file is written because other methods could use the keys-method after initialization.