Add more logging for failed builds
Made dog a bit less readable
Simplify dog a bit