minor refactor
added in-place script execution to preserve error messages