error handling in vm_helper modified to catch all kind of exceptions