Clean up code: Move string literals to the left side of string comparison, Change printstacktrace to logger

GCP-10513

Reviewer: Daniel Jao