Added except and changed version variable

Made version variable global and added except to recover normal terminal
mode