Wrap bootstrap in a transaction

- fixes racing conditions if multiple processes are starting at the same
  time