Sanity checks for failure

Prior to this commit we wrote the error to of the compile failure
to the log, this commit creates a .err file