Would it make sense for this function to actually generate the secret key file itself?