Swapped out all fmt.Printf statements with log.Print statements and added log.Fatal where appropriate.