Improved the error handling a little bit. Because code is being run through vm we can't use "instanceof Error" and so I created the ugly ErrorWrapper class