exit with code 1 if fail
add back in connection monitor

app doesnt seem to quit gracefully on azure like it does on my pc