Master should use channel to detect abort instead of flag.
Use log instead of fmt.
Use gocheck for testing.