Update startup script to properly check for keychain