[catalyst][health checker] Improve logging and timeouts

Add some logging to make diagnosing issues easier, and increase timeouts
to let health checker and catalyst finish cleanly more often. It seems
that fastboot takes longer inside the docker container than it does
locally.

Change-Id: I52f45352d9b7c45d10315c7e5951074b441fb7df
diff --git a/cmd/catalyst/main.go b/cmd/catalyst/main.go
index 1f6d7ae..2d67230 100644
--- a/cmd/catalyst/main.go
+++ b/cmd/catalyst/main.go
@@ -72,12 +72,15 @@
 
 	// Ensure that the context still exists before running the subprocess.
 	if ctx.Err() != nil {
+		log.Print("context exited before starting subprocess")
 		return failureExitCode
 	}
 
-	cmd.Stdout = os.Stdout
 	cmd.Stderr = os.Stderr
-	cmd.Run()
+	cmd.Stdout = os.Stdout
+	if err := cmd.Run(); err != nil {
+		log.Printf("err running subprocess: %v", err)
+	}
 	processDone <- true
 	return cmd.ProcessState.ExitCode()
 }
@@ -128,7 +131,7 @@
 }
 
 func runFastbootFlash(ctx context.Context, device *devicePkg.DeviceTarget, files []string) int {
-	timeoutCtx, cancel := context.WithTimeout(ctx, 30 * time.Second)
+	timeoutCtx, cancel := context.WithTimeout(ctx, 60 * time.Second)
 	defer cancel()
 	cmdSlice := BuildFastbootCmd(ctx, device.FastbootSernum(), files)
 	return runSubprocess(timeoutCtx, cmdSlice)
@@ -143,7 +146,7 @@
 			device.Powercycle(ctx)
 		} else if device.Type() == "astro" || device.Type() == "sherlock" {
 			if exitCode := runFastbootFlash(ctx, device, files); exitCode != 0 {
-				log.Printf("fastboot flash failed for %s", device.Nodename())
+				log.Printf("fastboot flash failed for %s: exit code: %d", device.Nodename(), exitCode)
 			}
 		} else {
 			go func(device *devicePkg.DeviceTarget) {
diff --git a/cmd/health_checker/main.go b/cmd/health_checker/main.go
index ea40e7b..3945a4c 100644
--- a/cmd/health_checker/main.go
+++ b/cmd/health_checker/main.go
@@ -117,7 +117,7 @@
 }
 
 func checkIfInFastboot(ctx context.Context, device *devicePkg.DeviceTarget) error {
-	timeoutContext, cancel := context.WithTimeout(ctx, 5*time.Second)
+	timeoutContext, cancel := context.WithTimeout(ctx, 15*time.Second)
 	defer cancel()
 	cmd := exec.CommandContext(timeoutContext, "fastboot", "devices")
 	output, err := cmd.Output()