Add exception handling to keyTab