invoker.php updated. Now the object is constructed inside a try..catch block.