Misc changes to improve error handling (not ready to land yet)

In particular this removes the need for the wrapper shell script (this means thing startup a bit faster) and errors on startup are caught.