#643 ensure script compilation/execution exceptions are logged

closes #643