Replace use of promise with simple callbacks

- since there can be several script failures, promise.reject cannot be called more than once