Refactor stochastic/replay.go to return error instead of log.Fatal
Refactor stochastic/replay.go to return error instead of log.Fatal