expect seems to have some problems with Opera and Safari, use try catch