Moved install_secret_key() out of if name == main