improved try / catch test