Adding Keyring.close() to make text exit properly