throws exception in case of script execution errors instead of return code