Replaced log.Fatal() with fmt.Printf to prevent g0 to exit. And fixed a test bug.